diff --git a/AppNexusSDK.podspec b/AppNexusSDK.podspec index 90a7575fc..06bd6aaf4 100644 --- a/AppNexusSDK.podspec +++ b/AppNexusSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "AppNexusSDK" - s.version = "7.10" + s.version = "7.11" s.platform = :ios, "9.0" s.summary = "AppNexus iOS Mobile Advertising SDK" @@ -29,7 +29,7 @@ DESC s.subspec 'GoogleAdapter' do |subspec| subspec.dependency 'AppNexusSDK/AppNexusSDK', "#{s.version}" - subspec.dependency 'Google-Mobile-Ads-SDK', '7.69.0' + subspec.dependency 'Google-Mobile-Ads-SDK', '8.0.0' subspec.source_files = "mediation/mediatedviews/GoogleAdMob/*.{h,m}" subspec.public_header_files = "mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.h" subspec.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '${PODS_ROOT}/Google-Mobile-Ads-SDK/**' } diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 17dd260e4..12c68c400 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,10 @@ +## 7.11 +### Improvements/Bug Fixes ++ MS-4714 Added improvement for Ad Expiry events for Native Ads. ++ MS-4685 Added API to disable tracking cookies during auction. +### Mediation partner updates ++ MS-4656 Upgraded Google AdMob SDK from v7.69.0 to v8.0.0 + ## 7.10 ### New Feature + MS-4659, MS-4674 Added support for User Id from external sources(Criteo, NetID, LiverRamp, The Trade Desk) (https://wiki.xandr.com/x/7IW1Bg) diff --git a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/BannerAd/BannerAdViewController.m b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/BannerAd/BannerAdViewController.m index 63043a30e..642784a39 100644 --- a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/BannerAd/BannerAdViewController.m +++ b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/BannerAd/BannerAdViewController.m @@ -36,12 +36,10 @@ - (void)viewDidLoad int adWidth = 300; int adHeight = 250; - NSString *adID = @"15215010"; + NSString *adID = @"17058950"; int adWidth1 = 320; int adHeight1 = 50; - NSString *inventoryCode = @"finanzen.net-app_ios_phone-home_index-banner"; - NSInteger memberID = 7823; // We want to center our ad on the screen. CGRect screenRect = [[UIScreen mainScreen] bounds]; diff --git a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/InterstitialAd/InterstitialAdViewController.m b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/InterstitialAd/InterstitialAdViewController.m index b9f55e627..b21936aaf 100644 --- a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/InterstitialAd/InterstitialAdViewController.m +++ b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/InterstitialAd/InterstitialAdViewController.m @@ -29,7 +29,7 @@ @implementation InterstitialAdViewController - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Interstitial Ad"; - self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:@"19212468"]; + self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:@"17058950"]; self.interstitialAd.delegate = self; self.interstitialAd.clickThroughAction = ANClickThroughActionReturnURL; [self.interstitialAd loadAd]; diff --git a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/MultiAdRequest/MultiAdViewController.m b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/MultiAdRequest/MultiAdViewController.m index 78ada6ba0..b6bf3925c 100644 --- a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/MultiAdRequest/MultiAdViewController.m +++ b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/MultiAdRequest/MultiAdViewController.m @@ -61,7 +61,7 @@ - (void)viewDidLoad { // Create Banner Ad Object - (ANBannerAdView *)createBannerAd:(UIView *) adView { - self.bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"15215010" adSize:CGSizeMake(300, 250)]; + self.bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"17058950" adSize:CGSizeMake(300, 250)]; self.bannerAd.rootViewController =self; self.bannerAd.delegate =self; self.bannerAd.shouldResizeAdToFitContainer = YES; @@ -73,7 +73,7 @@ - (ANBannerAdView *)createBannerAd:(UIView *) adView // Create Interstitial Ad Object - (ANInterstitialAd *)createInterstitialAd { - self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:@"19212468"]; + self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:@"17058950"]; self.interstitialAd.delegate =self; return self.interstitialAd; @@ -83,7 +83,7 @@ - (ANInterstitialAd *)createInterstitialAd // Create InstreamVideo Ad Object - (ANInstreamVideoAd *)createVideoAd { - self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:@"19212468"]; + self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:@"17058950"]; self.videoAd.loadDelegate =self; return self.videoAd; } @@ -92,7 +92,7 @@ - (ANInstreamVideoAd *)createVideoAd - (ANNativeAdRequest *)createNativeAd { self.nativeAdRequest = [[ANNativeAdRequest alloc] init]; - self.nativeAdRequest.placementId = @"19212468"; + self.nativeAdRequest.placementId = @"17058950"; self.nativeAdRequest.shouldLoadIconImage = YES; self.nativeAdRequest.shouldLoadMainImage = YES; self.nativeAdRequest.delegate = self; diff --git a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/VideoAd/VideoAdViewController.m b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/VideoAd/VideoAdViewController.m index 786ed6fbc..158ef3ee4 100644 --- a/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/VideoAd/VideoAdViewController.m +++ b/examples/ObjectiveC/SimpleIntegration/SimpleIntegrationObjC/VideoAd/VideoAdViewController.m @@ -23,7 +23,7 @@ NSString *const videoContent = @"https://acdn.adnxs.com/mobile/video_test/content/Scenario.mp4"; -NSString *const placementId = @"19212468"; +NSString *const placementId = @"17058950"; @@ -74,7 +74,6 @@ - (void)viewDidLoad { [self setupContentPlayer]; self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:placementId]; -// self.videoAd = [[ANInstreamVideoAd alloc] initWithMemberId:958 inventoryCode:@"trucksmash"]; [self.videoAd loadAdWithDelegate:self]; self.videoAd.clickThroughAction = ANClickThroughActionOpenSDKBrowser; diff --git a/examples/SimpleMediation/Podfile b/examples/SimpleMediation/Podfile new file mode 100644 index 000000000..5deec829d --- /dev/null +++ b/examples/SimpleMediation/Podfile @@ -0,0 +1,25 @@ + +# Define a global platform for your project. +platform :ios, '9.0' + + + + + +target 'SimpleMediation' do + pod 'Google-Mobile-Ads-SDK', '~> 7.67.0' + pod 'FBAudienceNetwork', '~> 6.2.0' + pod 'Smart-Display-SDK', '~> 7.8.0' + + +end + + +target 'SimpleCSR' do + pod 'FBAudienceNetwork', '~> 6.2.0' + +end + + + + diff --git a/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.storyboard b/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.storyboard new file mode 100644 index 000000000..f60f29b1d --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.storyboard @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.swift b/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.swift new file mode 100644 index 000000000..9ecfd3050 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/CSRViewController/Facebook/FacebookCSRNativeBanner.swift @@ -0,0 +1,80 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK +import FBAudienceNetwork +class FacebookCSRNativeBanner: UIViewController , ANNativeAdRequestDelegate , ANNativeAdDelegate { + + @IBOutlet var adCoverMediaView: FBMediaView! + @IBOutlet var adTitleLabel: UILabel! + @IBOutlet var adCallToActionButton: UIButton! + @IBOutlet var sponsoredLabel: UILabel! + @IBOutlet var adOptionsView: FBAdOptionsView! + + @IBOutlet weak var adUIView: UIStackView! + + var nativeAdRequest: ANNativeAdRequest? + var nativeAdResponse: ANNativeAdResponse? + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + FBAdSettings.addTestDevice(FBAdSettings.testDeviceHash()) + + nativeAdRequest = ANNativeAdRequest() + nativeAdRequest!.placementId = "1906599" + nativeAdRequest!.shouldLoadIconImage = true + nativeAdRequest!.shouldLoadMainImage = true + nativeAdRequest!.delegate = self + nativeAdRequest!.loadAd() + } + + + func adRequest(_ request: ANNativeAdRequest, didReceive response: ANNativeAdResponse) { + Toast.show(message: "adDidReceiveAd", controller: self) + adUIView.isHidden = false + self.nativeAdResponse = response + + + Toast.show(message: "Native ad was loaded, constructing native UI...", controller: self) + + // Render native ads onto UIView + adTitleLabel.text = self.nativeAdResponse?.title + sponsoredLabel.text = self.nativeAdResponse?.sponsoredBy + self.adCallToActionButton.setTitle(self.nativeAdResponse?.callToAction, for: .normal) + if self.nativeAdResponse?.customElements![kANNativeCSRObject] != nil && self.nativeAdResponse?.customElements![kANNativeCSRObject] != nil { + print("Register CSR Ad for tracking...") + + if let fbNativeBanner = self.nativeAdResponse?.customElements![kANNativeCSRObject] as? ANAdAdapterCSRNativeBannerFacebook { + fbNativeBanner.registerView( forTracking: adUIView, withRootViewController: self, iconView: self.adCoverMediaView, clickableViews: [self.adUIView!]) + } + // CSR registerViewForTracking (see example below) + }else{ + // Non CSR registerViewForTracking + // See native ad examples here: https://wiki.xandr.com/display/sdk/Show+Native+Ads+on+iOS + Toast.show(message: "Non CSR Native ad was loaded", controller: self) + + } + } + + + func adRequest(_ request: ANNativeAdRequest, didFailToLoadWithError error: Error, with adResponseInfo: ANAdResponseInfo?) { + Toast.show(message: "ad requestFailedWithError \(error)", controller: self) + } + +} + diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/AppDelegate.swift b/examples/SimpleMediation/SimpleCSR/SupportingFile/AppDelegate.swift new file mode 100644 index 000000000..e97aa51f3 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/AppDelegate.swift @@ -0,0 +1,34 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + + + +} + diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9221b9bb1 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/Contents.json b/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/LaunchScreen.storyboard b/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/Main.storyboard b/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/Main.storyboard new file mode 100644 index 000000000..fa5664c99 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/Base.lproj/Main.storyboard @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/Info.plist b/examples/SimpleMediation/SimpleCSR/SupportingFile/Info.plist new file mode 100644 index 000000000..cdf50e41a --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/Info.plist @@ -0,0 +1,50 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSR-Bridging-Header.h b/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSR-Bridging-Header.h new file mode 100644 index 000000000..423a79239 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSR-Bridging-Header.h @@ -0,0 +1,16 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import "ANAdAdapterCSRNativeBannerFacebook.h" diff --git a/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSRAdTypeListViewController.swift b/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSRAdTypeListViewController.swift new file mode 100644 index 000000000..dfc7a4f02 --- /dev/null +++ b/examples/SimpleMediation/SimpleCSR/SupportingFile/SimpleCSRAdTypeListViewController.swift @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +import UIKit + +class SimpleCSRAdTypeListViewController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} + diff --git a/examples/SimpleMediation/SimpleMediation.xcodeproj/project.pbxproj b/examples/SimpleMediation/SimpleMediation.xcodeproj/project.pbxproj new file mode 100644 index 000000000..cf6719446 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation.xcodeproj/project.pbxproj @@ -0,0 +1,1016 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0E5660EA23BE39AF0088EB36 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E5660E923BE39AF0088EB36 /* AppDelegate.swift */; }; + 0E5660F123BE39AF0088EB36 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E5660EF23BE39AF0088EB36 /* Main.storyboard */; }; + 0E5660F323BE39B10088EB36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0E5660F223BE39B10088EB36 /* Assets.xcassets */; }; + 0E5670A3240D04BB0006B158 /* FacebookBannerAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E5670A0240D04BB0006B158 /* FacebookBannerAd.storyboard */; }; + 0E5670A4240D04BB0006B158 /* FacebookInterstitialAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E5670A1240D04BB0006B158 /* FacebookInterstitialAd.storyboard */; }; + 0E5B043E23BF4EED00DEBACE /* VideoAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E5B043D23BF4EED00DEBACE /* VideoAdViewController.swift */; }; + 0E5B044023BF618800DEBACE /* SimpleMediationAdTypeListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E5B043F23BF618800DEBACE /* SimpleMediationAdTypeListViewController.swift */; }; + 0E82E4CF245CC33500EC19E1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E82E4CE245CC33500EC19E1 /* AppDelegate.swift */; }; + 0E82E4D3245CC33500EC19E1 /* SimpleCSRAdTypeListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E82E4D2245CC33500EC19E1 /* SimpleCSRAdTypeListViewController.swift */; }; + 0E82E4D6245CC33500EC19E1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E82E4D4245CC33500EC19E1 /* Main.storyboard */; }; + 0E82E4D8245CC33600EC19E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0E82E4D7245CC33600EC19E1 /* Assets.xcassets */; }; + 0E82E4DB245CC33600EC19E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E82E4D9245CC33600EC19E1 /* LaunchScreen.storyboard */; }; + 0E82E4E0245CC34D00EC19E1 /* FacebookCSRNativeBanner.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E56709F240D04BB0006B158 /* FacebookCSRNativeBanner.storyboard */; }; + 0E82E4E1245CC34D00EC19E1 /* FacebookCSRNativeBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E5B045023BF652C00DEBACE /* FacebookCSRNativeBanner.swift */; }; + 0E82E4E4245CC6B600EC19E1 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04323FD6EB300D0C060 /* Toast.swift */; }; + 0E82E508245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E82E504245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.m */; }; + 0E82E509245CD27C00EC19E1 /* ANFBSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E82E505245CD27C00EC19E1 /* ANFBSettings.m */; }; + 0EE0D04023FD6D1D00D0C060 /* VideoAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D03E23FD6D1D00D0C060 /* VideoAd.storyboard */; }; + 0EE0D04523FD6EB300D0C060 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04323FD6EB300D0C060 /* Toast.swift */; }; + 0EE0D04823FD6EEC00D0C060 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D04623FD6EEC00D0C060 /* LaunchScreen.storyboard */; }; + 0EE0D04A23FD723800D0C060 /* AdmobDFPBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04923FD723800D0C060 /* AdmobDFPBannerAdViewController.swift */; }; + 0EE0D04C23FD728200D0C060 /* AdmobDFPInterstitialAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04B23FD728200D0C060 /* AdmobDFPInterstitialAdViewController.swift */; }; + 0EE0D04F23FD728A00D0C060 /* FacebookInterstitialAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04D23FD728A00D0C060 /* FacebookInterstitialAdViewController.swift */; }; + 0EE0D05023FD728A00D0C060 /* FacebookBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D04E23FD728A00D0C060 /* FacebookBannerAdViewController.swift */; }; + 0EE0D05B23FD72A200D0C060 /* SmartAdBannerAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D05923FD72A100D0C060 /* SmartAdBannerAdViewController.swift */; }; + 0EE0D05C23FD72A200D0C060 /* SmartAdInterstitialAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D05A23FD72A200D0C060 /* SmartAdInterstitialAdViewController.swift */; }; + 0EE0D06423FD764800D0C060 /* AdMobDFPNativeAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D06023FD764800D0C060 /* AdMobDFPNativeAd.storyboard */; }; + 0EE0D06523FD764800D0C060 /* AdmobDFPInterstitialAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D06123FD764800D0C060 /* AdmobDFPInterstitialAd.storyboard */; }; + 0EE0D06623FD764800D0C060 /* AdMobDFPNativeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D06223FD764800D0C060 /* AdMobDFPNativeViewController.swift */; }; + 0EE0D06723FD764800D0C060 /* AdmobDFPBannerAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D06323FD764800D0C060 /* AdmobDFPBannerAd.storyboard */; }; + 0EE0D06A23FD7C1300D0C060 /* SmartAdInterstitialAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D06823FD7C1300D0C060 /* SmartAdInterstitialAd.storyboard */; }; + 0EE0D06B23FD7C1300D0C060 /* SmartAdBannerAd.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D06923FD7C1300D0C060 /* SmartAdBannerAd.storyboard */; }; + 0EE0D0C323FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09223FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.m */; }; + 0EE0D0C423FD7E0100D0C060 /* ANAdAdapterSmartAdBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09323FD7E0100D0C060 /* ANAdAdapterSmartAdBase.m */; }; + 0EE0D0C523FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09723FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.m */; }; + 0EE0D0C623FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09A23FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.m */; }; + 0EE0D0C723FD7E0100D0C060 /* ANAdAdapterNativeAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09C23FD7E0100D0C060 /* ANAdAdapterNativeAdMob.m */; }; + 0EE0D0C823FD7E0100D0C060 /* ANAdAdapterBannerDFP.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09D23FD7E0100D0C060 /* ANAdAdapterBannerDFP.m */; }; + 0EE0D0C923FD7E0100D0C060 /* ANAdAdapterBaseDFP.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09E23FD7E0100D0C060 /* ANAdAdapterBaseDFP.m */; }; + 0EE0D0CA23FD7E0100D0C060 /* ANAdAdapterBannerAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D09F23FD7E0100D0C060 /* ANAdAdapterBannerAdMob.m */; }; + 0EE0D0CB23FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D0A023FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.m */; }; + 0EE0D0CC23FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D0A623FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.m */; }; + 0EE0D0CD23FD7E0100D0C060 /* ANAdAdapterNativeFacebook.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D0A823FD7E0100D0C060 /* ANAdAdapterNativeFacebook.m */; }; + 0EE0D0CE23FD7E0100D0C060 /* ANAdAdapterBannerFacebook.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE0D0AA23FD7E0100D0C060 /* ANAdAdapterBannerFacebook.m */; }; + 0EE0D0D423FD7ECE00D0C060 /* UnifiedNativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0EE0D0D323FD7ECE00D0C060 /* UnifiedNativeAdView.xib */; }; + 5377DBB872736776143319CD /* libPods-SimpleMediation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DE667F379478A83D548F9F0D /* libPods-SimpleMediation.a */; }; + FCC64C9425A7353F006E5A54 /* AppNexusSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E82E4F4245CCA5600EC19E1 /* AppNexusSDK.framework */; }; + FCC64C9525A7353F006E5A54 /* AppNexusSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0E82E4F4245CCA5600EC19E1 /* AppNexusSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + FCC64C9625A7354C006E5A54 /* AppNexusNativeSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E82E4F6245CCA5600EC19E1 /* AppNexusNativeSDK.framework */; }; + FCC64C9725A7354C006E5A54 /* AppNexusNativeSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0E82E4F6245CCA5600EC19E1 /* AppNexusNativeSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + FCC64CB225A739DE006E5A54 /* FacebookNative.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FCC64CAE25A739DE006E5A54 /* FacebookNative.storyboard */; }; + FCC64CB325A739DE006E5A54 /* FacebookNativeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC64CB125A739DE006E5A54 /* FacebookNativeViewController.swift */; }; + FD5B5E40BF0E1B733147D46F /* libPods-SimpleCSR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E25579F2531BE4E0FECD662 /* libPods-SimpleCSR.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0E82E4F3245CCA5600EC19E1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0E82E4EE245CCA5600EC19E1 /* AppNexusSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8A9AED8C1A1BE84F00C58BDA; + remoteInfo = AppNexusSDK; + }; + 0E82E4F5245CCA5600EC19E1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0E82E4EE245CCA5600EC19E1 /* AppNexusSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F5731AFD228B43570012B134; + remoteInfo = AppNexusNativeSDK; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0E56610923BE3A530088EB36 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + FCC64C9525A7353F006E5A54 /* AppNexusSDK.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + FCC64C9825A7354D006E5A54 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + FCC64C9725A7354C006E5A54 /* AppNexusNativeSDK.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0E246167240E7B57004B9BC4 /* SimpleMediation-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SimpleMediation-Bridging-Header.h"; sourceTree = ""; }; + 0E5660E623BE39AF0088EB36 /* SimpleMediation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleMediation.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E5660E923BE39AF0088EB36 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 0E5660F023BE39AF0088EB36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0E5660F223BE39B10088EB36 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0E5660F723BE39B10088EB36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0E56709F240D04BB0006B158 /* FacebookCSRNativeBanner.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = FacebookCSRNativeBanner.storyboard; sourceTree = ""; }; + 0E5670A0240D04BB0006B158 /* FacebookBannerAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = FacebookBannerAd.storyboard; sourceTree = ""; }; + 0E5670A1240D04BB0006B158 /* FacebookInterstitialAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = FacebookInterstitialAd.storyboard; sourceTree = ""; }; + 0E5B043D23BF4EED00DEBACE /* VideoAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoAdViewController.swift; sourceTree = ""; }; + 0E5B043F23BF618800DEBACE /* SimpleMediationAdTypeListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleMediationAdTypeListViewController.swift; sourceTree = ""; }; + 0E5B045023BF652C00DEBACE /* FacebookCSRNativeBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FacebookCSRNativeBanner.swift; sourceTree = ""; }; + 0E82E4CC245CC33500EC19E1 /* SimpleCSR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleCSR.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E82E4CE245CC33500EC19E1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 0E82E4D2245CC33500EC19E1 /* SimpleCSRAdTypeListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleCSRAdTypeListViewController.swift; sourceTree = ""; }; + 0E82E4D5245CC33500EC19E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0E82E4D7245CC33600EC19E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0E82E4DA245CC33600EC19E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0E82E4DC245CC33600EC19E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0E82E4E7245CC74E00EC19E1 /* SimpleCSR-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SimpleCSR-Bridging-Header.h"; sourceTree = ""; }; + 0E82E4EE245CCA5600EC19E1 /* AppNexusSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AppNexusSDK.xcodeproj; path = ../../sdk/AppNexusSDK.xcodeproj; sourceTree = ""; }; + 0E82E504245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterCSRNativeBannerFacebook.m; sourceTree = ""; }; + 0E82E505245CD27C00EC19E1 /* ANFBSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANFBSettings.m; sourceTree = ""; }; + 0E82E506245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterCSRNativeBannerFacebook.h; sourceTree = ""; }; + 0E82E507245CD27C00EC19E1 /* ANFBSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANFBSettings.h; sourceTree = ""; }; + 0EE0D03F23FD6D1D00D0C060 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = SimpleMediation/Base.lproj/VideoAd.storyboard; sourceTree = SOURCE_ROOT; }; + 0EE0D04323FD6EB300D0C060 /* Toast.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = ""; }; + 0EE0D04723FD6EEC00D0C060 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = SimpleMediation/Base.lproj/LaunchScreen.storyboard; sourceTree = SOURCE_ROOT; }; + 0EE0D04923FD723800D0C060 /* AdmobDFPBannerAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdmobDFPBannerAdViewController.swift; sourceTree = ""; }; + 0EE0D04B23FD728200D0C060 /* AdmobDFPInterstitialAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdmobDFPInterstitialAdViewController.swift; sourceTree = ""; }; + 0EE0D04D23FD728A00D0C060 /* FacebookInterstitialAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacebookInterstitialAdViewController.swift; sourceTree = ""; }; + 0EE0D04E23FD728A00D0C060 /* FacebookBannerAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacebookBannerAdViewController.swift; sourceTree = ""; }; + 0EE0D05923FD72A100D0C060 /* SmartAdBannerAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SmartAdBannerAdViewController.swift; sourceTree = ""; }; + 0EE0D05A23FD72A200D0C060 /* SmartAdInterstitialAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SmartAdInterstitialAdViewController.swift; sourceTree = ""; }; + 0EE0D06023FD764800D0C060 /* AdMobDFPNativeAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AdMobDFPNativeAd.storyboard; sourceTree = ""; }; + 0EE0D06123FD764800D0C060 /* AdmobDFPInterstitialAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AdmobDFPInterstitialAd.storyboard; sourceTree = ""; }; + 0EE0D06223FD764800D0C060 /* AdMobDFPNativeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdMobDFPNativeViewController.swift; sourceTree = ""; }; + 0EE0D06323FD764800D0C060 /* AdmobDFPBannerAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AdmobDFPBannerAd.storyboard; sourceTree = ""; }; + 0EE0D06823FD7C1300D0C060 /* SmartAdInterstitialAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SmartAdInterstitialAd.storyboard; sourceTree = ""; }; + 0EE0D06923FD7C1300D0C060 /* SmartAdBannerAd.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SmartAdBannerAd.storyboard; sourceTree = ""; }; + 0EE0D09223FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBannerSmartAd.m; sourceTree = ""; }; + 0EE0D09323FD7E0100D0C060 /* ANAdAdapterSmartAdBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterSmartAdBase.m; sourceTree = ""; }; + 0EE0D09423FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterInterstitialSmartAd.h; sourceTree = ""; }; + 0EE0D09523FD7E0100D0C060 /* ANAdAdapterSmartAdBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterSmartAdBase.h; sourceTree = ""; }; + 0EE0D09623FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBannerSmartAd.h; sourceTree = ""; }; + 0EE0D09723FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterInterstitialSmartAd.m; sourceTree = ""; }; + 0EE0D09923FD7E0100D0C060 /* ANAdAdapterBannerAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBannerAdMob.h; sourceTree = ""; }; + 0EE0D09A23FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterInterstitialDFP.m; sourceTree = ""; }; + 0EE0D09B23FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterInterstitialAdMob.h; sourceTree = ""; }; + 0EE0D09C23FD7E0100D0C060 /* ANAdAdapterNativeAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterNativeAdMob.m; sourceTree = ""; }; + 0EE0D09D23FD7E0100D0C060 /* ANAdAdapterBannerDFP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBannerDFP.m; sourceTree = ""; }; + 0EE0D09E23FD7E0100D0C060 /* ANAdAdapterBaseDFP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBaseDFP.m; sourceTree = ""; }; + 0EE0D09F23FD7E0100D0C060 /* ANAdAdapterBannerAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBannerAdMob.m; sourceTree = ""; }; + 0EE0D0A023FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterInterstitialAdMob.m; sourceTree = ""; }; + 0EE0D0A123FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterInterstitialDFP.h; sourceTree = ""; }; + 0EE0D0A223FD7E0100D0C060 /* ANAdAdapterNativeAdMob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterNativeAdMob.h; sourceTree = ""; }; + 0EE0D0A323FD7E0100D0C060 /* ANAdAdapterBaseDFP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBaseDFP.h; sourceTree = ""; }; + 0EE0D0A423FD7E0100D0C060 /* ANAdAdapterBannerDFP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBannerDFP.h; sourceTree = ""; }; + 0EE0D0A623FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterInterstitialFacebook.m; sourceTree = ""; }; + 0EE0D0A723FD7E0100D0C060 /* ANAdAdapterBannerFacebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBannerFacebook.h; sourceTree = ""; }; + 0EE0D0A823FD7E0100D0C060 /* ANAdAdapterNativeFacebook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterNativeFacebook.m; sourceTree = ""; }; + 0EE0D0A923FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterInterstitialFacebook.h; sourceTree = ""; }; + 0EE0D0AA23FD7E0100D0C060 /* ANAdAdapterBannerFacebook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBannerFacebook.m; sourceTree = ""; }; + 0EE0D0AB23FD7E0100D0C060 /* ANAdAdapterNativeFacebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterNativeFacebook.h; sourceTree = ""; }; + 0EE0D0D323FD7ECE00D0C060 /* UnifiedNativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UnifiedNativeAdView.xib; sourceTree = ""; }; + 2E25579F2531BE4E0FECD662 /* libPods-SimpleCSR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SimpleCSR.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E9D464632CE623986E47C03 /* Pods-SimpleMediation.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleMediation.release.xcconfig"; path = "Target Support Files/Pods-SimpleMediation/Pods-SimpleMediation.release.xcconfig"; sourceTree = ""; }; + 92D9B61421003C0822F05D3F /* Pods-SimpleCSR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleCSR.debug.xcconfig"; path = "Target Support Files/Pods-SimpleCSR/Pods-SimpleCSR.debug.xcconfig"; sourceTree = ""; }; + 941E857F252A95374E5394AF /* Pods-SimpleMediation.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleMediation.debug.xcconfig"; path = "Target Support Files/Pods-SimpleMediation/Pods-SimpleMediation.debug.xcconfig"; sourceTree = ""; }; + DE667F379478A83D548F9F0D /* libPods-SimpleMediation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SimpleMediation.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F8136949A8662F8B5D433773 /* Pods-SimpleCSR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleCSR.release.xcconfig"; path = "Target Support Files/Pods-SimpleCSR/Pods-SimpleCSR.release.xcconfig"; sourceTree = ""; }; + FCC64CAE25A739DE006E5A54 /* FacebookNative.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = FacebookNative.storyboard; sourceTree = ""; }; + FCC64CB125A739DE006E5A54 /* FacebookNativeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FacebookNativeViewController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0E5660E323BE39AF0088EB36 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FCC64C9425A7353F006E5A54 /* AppNexusSDK.framework in Frameworks */, + 5377DBB872736776143319CD /* libPods-SimpleMediation.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E82E4C9245CC33500EC19E1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FCC64C9625A7354C006E5A54 /* AppNexusNativeSDK.framework in Frameworks */, + FD5B5E40BF0E1B733147D46F /* libPods-SimpleCSR.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0E5660DD23BE39AF0088EB36 = { + isa = PBXGroup; + children = ( + 0E82E4EE245CCA5600EC19E1 /* AppNexusSDK.xcodeproj */, + 0E5660E823BE39AF0088EB36 /* SimpleMediation */, + 0E82E4CD245CC33500EC19E1 /* SimpleCSR */, + 0E5660E723BE39AF0088EB36 /* Products */, + D727BB3B00EB1882B9FF6E82 /* Pods */, + FCC64C9125A7353F006E5A54 /* Frameworks */, + ); + sourceTree = ""; + }; + 0E5660E723BE39AF0088EB36 /* Products */ = { + isa = PBXGroup; + children = ( + 0E5660E623BE39AF0088EB36 /* SimpleMediation.app */, + 0E82E4CC245CC33500EC19E1 /* SimpleCSR.app */, + ); + name = Products; + sourceTree = ""; + }; + 0E5660E823BE39AF0088EB36 /* SimpleMediation */ = { + isa = PBXGroup; + children = ( + 0EE0D03C23FD6CB400D0C060 /* MediationViewController */, + 0E5B044423BF641300DEBACE /* NavigationViewController */, + 0E56613B23BF2F120088EB36 /* SupportFiles */, + ); + path = SimpleMediation; + sourceTree = ""; + }; + 0E56613B23BF2F120088EB36 /* SupportFiles */ = { + isa = PBXGroup; + children = ( + 0E5660F723BE39B10088EB36 /* Info.plist */, + 0E5660F223BE39B10088EB36 /* Assets.xcassets */, + 0EE0D04123FD6EB300D0C060 /* SupportingFiles */, + ); + name = SupportFiles; + sourceTree = ""; + }; + 0E5B044423BF641300DEBACE /* NavigationViewController */ = { + isa = PBXGroup; + children = ( + 0E5660EF23BE39AF0088EB36 /* Main.storyboard */, + 0E5B043F23BF618800DEBACE /* SimpleMediationAdTypeListViewController.swift */, + ); + path = NavigationViewController; + sourceTree = ""; + }; + 0E82E4CD245CC33500EC19E1 /* SimpleCSR */ = { + isa = PBXGroup; + children = ( + 0E82E4E2245CC38000EC19E1 /* SupportingFile */, + 0EFC4C97245CC28C008FE3C6 /* CSRViewController */, + ); + path = SimpleCSR; + sourceTree = ""; + }; + 0E82E4E2245CC38000EC19E1 /* SupportingFile */ = { + isa = PBXGroup; + children = ( + 0E82E4D7245CC33600EC19E1 /* Assets.xcassets */, + 0E82E4DC245CC33600EC19E1 /* Info.plist */, + 0E82E4D9245CC33600EC19E1 /* LaunchScreen.storyboard */, + 0E82E4D4245CC33500EC19E1 /* Main.storyboard */, + 0E82E4CE245CC33500EC19E1 /* AppDelegate.swift */, + 0E82E4D2245CC33500EC19E1 /* SimpleCSRAdTypeListViewController.swift */, + 0E82E4E7245CC74E00EC19E1 /* SimpleCSR-Bridging-Header.h */, + 0E82E502245CD27C00EC19E1 /* csr */, + ); + path = SupportingFile; + sourceTree = ""; + }; + 0E82E4EF245CCA5600EC19E1 /* Products */ = { + isa = PBXGroup; + children = ( + 0E82E4F4245CCA5600EC19E1 /* AppNexusSDK.framework */, + 0E82E4F6245CCA5600EC19E1 /* AppNexusNativeSDK.framework */, + ); + name = Products; + sourceTree = ""; + }; + 0E82E502245CD27C00EC19E1 /* csr */ = { + isa = PBXGroup; + children = ( + 0E82E503245CD27C00EC19E1 /* Facebook */, + ); + name = csr; + path = ../../../../csr; + sourceTree = ""; + }; + 0E82E503245CD27C00EC19E1 /* Facebook */ = { + isa = PBXGroup; + children = ( + 0E82E504245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.m */, + 0E82E505245CD27C00EC19E1 /* ANFBSettings.m */, + 0E82E506245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.h */, + 0E82E507245CD27C00EC19E1 /* ANFBSettings.h */, + ); + path = Facebook; + sourceTree = ""; + }; + 0EE0D03723FD6C8E00D0C060 /* SmartAd */ = { + isa = PBXGroup; + children = ( + 0EE0D05923FD72A100D0C060 /* SmartAdBannerAdViewController.swift */, + 0EE0D06923FD7C1300D0C060 /* SmartAdBannerAd.storyboard */, + 0EE0D05A23FD72A200D0C060 /* SmartAdInterstitialAdViewController.swift */, + 0EE0D06823FD7C1300D0C060 /* SmartAdInterstitialAd.storyboard */, + ); + path = SmartAd; + sourceTree = ""; + }; + 0EE0D03923FD6C8E00D0C060 /* Admob */ = { + isa = PBXGroup; + children = ( + 0EE0D04923FD723800D0C060 /* AdmobDFPBannerAdViewController.swift */, + 0EE0D06323FD764800D0C060 /* AdmobDFPBannerAd.storyboard */, + 0EE0D04B23FD728200D0C060 /* AdmobDFPInterstitialAdViewController.swift */, + 0EE0D06123FD764800D0C060 /* AdmobDFPInterstitialAd.storyboard */, + 0EE0D06223FD764800D0C060 /* AdMobDFPNativeViewController.swift */, + 0EE0D06023FD764800D0C060 /* AdMobDFPNativeAd.storyboard */, + 0EE0D0D323FD7ECE00D0C060 /* UnifiedNativeAdView.xib */, + ); + path = Admob; + sourceTree = ""; + }; + 0EE0D03A23FD6C8E00D0C060 /* Facebook */ = { + isa = PBXGroup; + children = ( + FCC64CAE25A739DE006E5A54 /* FacebookNative.storyboard */, + FCC64CB125A739DE006E5A54 /* FacebookNativeViewController.swift */, + 0E5670A0240D04BB0006B158 /* FacebookBannerAd.storyboard */, + 0EE0D04E23FD728A00D0C060 /* FacebookBannerAdViewController.swift */, + 0E5670A1240D04BB0006B158 /* FacebookInterstitialAd.storyboard */, + 0EE0D04D23FD728A00D0C060 /* FacebookInterstitialAdViewController.swift */, + ); + path = Facebook; + sourceTree = ""; + }; + 0EE0D03C23FD6CB400D0C060 /* MediationViewController */ = { + isa = PBXGroup; + children = ( + 0EE0D03923FD6C8E00D0C060 /* Admob */, + 0EE0D03A23FD6C8E00D0C060 /* Facebook */, + 0EE0D03723FD6C8E00D0C060 /* SmartAd */, + 0EE0D03D23FD6CE200D0C060 /* VideoAd */, + ); + path = MediationViewController; + sourceTree = ""; + }; + 0EE0D03D23FD6CE200D0C060 /* VideoAd */ = { + isa = PBXGroup; + children = ( + 0E5B043D23BF4EED00DEBACE /* VideoAdViewController.swift */, + 0EE0D03E23FD6D1D00D0C060 /* VideoAd.storyboard */, + ); + path = VideoAd; + sourceTree = ""; + }; + 0EE0D04123FD6EB300D0C060 /* SupportingFiles */ = { + isa = PBXGroup; + children = ( + 0E246167240E7B57004B9BC4 /* SimpleMediation-Bridging-Header.h */, + 0EE0D07123FD7E0100D0C060 /* mediatedviews */, + 0E5660E923BE39AF0088EB36 /* AppDelegate.swift */, + 0EE0D04623FD6EEC00D0C060 /* LaunchScreen.storyboard */, + 0EE0D04323FD6EB300D0C060 /* Toast.swift */, + ); + path = SupportingFiles; + sourceTree = ""; + }; + 0EE0D07123FD7E0100D0C060 /* mediatedviews */ = { + isa = PBXGroup; + children = ( + 0EE0D09123FD7E0100D0C060 /* SmartAd */, + 0EE0D09823FD7E0100D0C060 /* GoogleAdMob */, + 0EE0D0A523FD7E0100D0C060 /* Facebook */, + ); + name = mediatedviews; + path = ../../../../mediation/mediatedviews; + sourceTree = ""; + }; + 0EE0D09123FD7E0100D0C060 /* SmartAd */ = { + isa = PBXGroup; + children = ( + 0EE0D09223FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.m */, + 0EE0D09323FD7E0100D0C060 /* ANAdAdapterSmartAdBase.m */, + 0EE0D09423FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.h */, + 0EE0D09523FD7E0100D0C060 /* ANAdAdapterSmartAdBase.h */, + 0EE0D09623FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.h */, + 0EE0D09723FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.m */, + ); + path = SmartAd; + sourceTree = ""; + }; + 0EE0D09823FD7E0100D0C060 /* GoogleAdMob */ = { + isa = PBXGroup; + children = ( + 0EE0D09923FD7E0100D0C060 /* ANAdAdapterBannerAdMob.h */, + 0EE0D09A23FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.m */, + 0EE0D09B23FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.h */, + 0EE0D09C23FD7E0100D0C060 /* ANAdAdapterNativeAdMob.m */, + 0EE0D09D23FD7E0100D0C060 /* ANAdAdapterBannerDFP.m */, + 0EE0D09E23FD7E0100D0C060 /* ANAdAdapterBaseDFP.m */, + 0EE0D09F23FD7E0100D0C060 /* ANAdAdapterBannerAdMob.m */, + 0EE0D0A023FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.m */, + 0EE0D0A123FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.h */, + 0EE0D0A223FD7E0100D0C060 /* ANAdAdapterNativeAdMob.h */, + 0EE0D0A323FD7E0100D0C060 /* ANAdAdapterBaseDFP.h */, + 0EE0D0A423FD7E0100D0C060 /* ANAdAdapterBannerDFP.h */, + ); + path = GoogleAdMob; + sourceTree = ""; + }; + 0EE0D0A523FD7E0100D0C060 /* Facebook */ = { + isa = PBXGroup; + children = ( + 0EE0D0A623FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.m */, + 0EE0D0A723FD7E0100D0C060 /* ANAdAdapterBannerFacebook.h */, + 0EE0D0A823FD7E0100D0C060 /* ANAdAdapterNativeFacebook.m */, + 0EE0D0A923FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.h */, + 0EE0D0AA23FD7E0100D0C060 /* ANAdAdapterBannerFacebook.m */, + 0EE0D0AB23FD7E0100D0C060 /* ANAdAdapterNativeFacebook.h */, + ); + path = Facebook; + sourceTree = ""; + }; + 0EFC4C97245CC28C008FE3C6 /* CSRViewController */ = { + isa = PBXGroup; + children = ( + 0EFC4C9A245CC29B008FE3C6 /* Facebook */, + ); + path = CSRViewController; + sourceTree = ""; + }; + 0EFC4C9A245CC29B008FE3C6 /* Facebook */ = { + isa = PBXGroup; + children = ( + 0E56709F240D04BB0006B158 /* FacebookCSRNativeBanner.storyboard */, + 0E5B045023BF652C00DEBACE /* FacebookCSRNativeBanner.swift */, + ); + path = Facebook; + sourceTree = ""; + }; + D727BB3B00EB1882B9FF6E82 /* Pods */ = { + isa = PBXGroup; + children = ( + 92D9B61421003C0822F05D3F /* Pods-SimpleCSR.debug.xcconfig */, + F8136949A8662F8B5D433773 /* Pods-SimpleCSR.release.xcconfig */, + 941E857F252A95374E5394AF /* Pods-SimpleMediation.debug.xcconfig */, + 7E9D464632CE623986E47C03 /* Pods-SimpleMediation.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + FCC64C9125A7353F006E5A54 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2E25579F2531BE4E0FECD662 /* libPods-SimpleCSR.a */, + DE667F379478A83D548F9F0D /* libPods-SimpleMediation.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0E5660E523BE39AF0088EB36 /* SimpleMediation */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0E5660FA23BE39B10088EB36 /* Build configuration list for PBXNativeTarget "SimpleMediation" */; + buildPhases = ( + E4427E3807B201AD8D491461 /* [CP] Check Pods Manifest.lock */, + 0E5660E223BE39AF0088EB36 /* Sources */, + 0E5660E323BE39AF0088EB36 /* Frameworks */, + 0E5660E423BE39AF0088EB36 /* Resources */, + 0E56610923BE3A530088EB36 /* Embed Frameworks */, + 52AAF64888926C19958E7F92 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SimpleMediation; + productName = SimpleMediation; + productReference = 0E5660E623BE39AF0088EB36 /* SimpleMediation.app */; + productType = "com.apple.product-type.application"; + }; + 0E82E4CB245CC33500EC19E1 /* SimpleCSR */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0E82E4DD245CC33600EC19E1 /* Build configuration list for PBXNativeTarget "SimpleCSR" */; + buildPhases = ( + 21D4B301EAB5EB374171B026 /* [CP] Check Pods Manifest.lock */, + 0E82E4C8245CC33500EC19E1 /* Sources */, + 0E82E4C9245CC33500EC19E1 /* Frameworks */, + 0E82E4CA245CC33500EC19E1 /* Resources */, + FCC64C9825A7354D006E5A54 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SimpleCSR; + productName = SimpleCSR; + productReference = 0E82E4CC245CC33500EC19E1 /* SimpleCSR.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0E5660DE23BE39AF0088EB36 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1140; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Xandr; + TargetAttributes = { + 0E5660E523BE39AF0088EB36 = { + CreatedOnToolsVersion = 11.3; + }; + 0E82E4CB245CC33500EC19E1 = { + CreatedOnToolsVersion = 11.4; + }; + }; + }; + buildConfigurationList = 0E5660E123BE39AF0088EB36 /* Build configuration list for PBXProject "SimpleMediation" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0E5660DD23BE39AF0088EB36; + productRefGroup = 0E5660E723BE39AF0088EB36 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 0E82E4EF245CCA5600EC19E1 /* Products */; + ProjectRef = 0E82E4EE245CCA5600EC19E1 /* AppNexusSDK.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 0E5660E523BE39AF0088EB36 /* SimpleMediation */, + 0E82E4CB245CC33500EC19E1 /* SimpleCSR */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 0E82E4F4245CCA5600EC19E1 /* AppNexusSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = AppNexusSDK.framework; + remoteRef = 0E82E4F3245CCA5600EC19E1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 0E82E4F6245CCA5600EC19E1 /* AppNexusNativeSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = AppNexusNativeSDK.framework; + remoteRef = 0E82E4F5245CCA5600EC19E1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 0E5660E423BE39AF0088EB36 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EE0D06B23FD7C1300D0C060 /* SmartAdBannerAd.storyboard in Resources */, + 0EE0D04823FD6EEC00D0C060 /* LaunchScreen.storyboard in Resources */, + 0EE0D06723FD764800D0C060 /* AdmobDFPBannerAd.storyboard in Resources */, + 0EE0D06A23FD7C1300D0C060 /* SmartAdInterstitialAd.storyboard in Resources */, + 0EE0D0D423FD7ECE00D0C060 /* UnifiedNativeAdView.xib in Resources */, + 0EE0D04023FD6D1D00D0C060 /* VideoAd.storyboard in Resources */, + 0EE0D06423FD764800D0C060 /* AdMobDFPNativeAd.storyboard in Resources */, + 0EE0D06523FD764800D0C060 /* AdmobDFPInterstitialAd.storyboard in Resources */, + 0E5670A4240D04BB0006B158 /* FacebookInterstitialAd.storyboard in Resources */, + 0E5670A3240D04BB0006B158 /* FacebookBannerAd.storyboard in Resources */, + 0E5660F323BE39B10088EB36 /* Assets.xcassets in Resources */, + FCC64CB225A739DE006E5A54 /* FacebookNative.storyboard in Resources */, + 0E5660F123BE39AF0088EB36 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E82E4CA245CC33500EC19E1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E82E4DB245CC33600EC19E1 /* LaunchScreen.storyboard in Resources */, + 0E82E4E0245CC34D00EC19E1 /* FacebookCSRNativeBanner.storyboard in Resources */, + 0E82E4D8245CC33600EC19E1 /* Assets.xcassets in Resources */, + 0E82E4D6245CC33500EC19E1 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 21D4B301EAB5EB374171B026 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SimpleCSR-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 52AAF64888926C19958E7F92 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SimpleMediation/Pods-SimpleMediation-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SimpleMediation/Pods-SimpleMediation-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SimpleMediation/Pods-SimpleMediation-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E4427E3807B201AD8D491461 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SimpleMediation-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0E5660E223BE39AF0088EB36 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EE0D0C723FD7E0100D0C060 /* ANAdAdapterNativeAdMob.m in Sources */, + FCC64CB325A739DE006E5A54 /* FacebookNativeViewController.swift in Sources */, + 0EE0D0CA23FD7E0100D0C060 /* ANAdAdapterBannerAdMob.m in Sources */, + 0EE0D05C23FD72A200D0C060 /* SmartAdInterstitialAdViewController.swift in Sources */, + 0EE0D0C623FD7E0100D0C060 /* ANAdAdapterInterstitialDFP.m in Sources */, + 0EE0D0C323FD7E0100D0C060 /* ANAdAdapterBannerSmartAd.m in Sources */, + 0EE0D0CB23FD7E0100D0C060 /* ANAdAdapterInterstitialAdMob.m in Sources */, + 0EE0D0C523FD7E0100D0C060 /* ANAdAdapterInterstitialSmartAd.m in Sources */, + 0EE0D0CC23FD7E0100D0C060 /* ANAdAdapterInterstitialFacebook.m in Sources */, + 0E5B043E23BF4EED00DEBACE /* VideoAdViewController.swift in Sources */, + 0EE0D0C423FD7E0100D0C060 /* ANAdAdapterSmartAdBase.m in Sources */, + 0EE0D05023FD728A00D0C060 /* FacebookBannerAdViewController.swift in Sources */, + 0EE0D06623FD764800D0C060 /* AdMobDFPNativeViewController.swift in Sources */, + 0EE0D05B23FD72A200D0C060 /* SmartAdBannerAdViewController.swift in Sources */, + 0EE0D04F23FD728A00D0C060 /* FacebookInterstitialAdViewController.swift in Sources */, + 0EE0D0CD23FD7E0100D0C060 /* ANAdAdapterNativeFacebook.m in Sources */, + 0E5B044023BF618800DEBACE /* SimpleMediationAdTypeListViewController.swift in Sources */, + 0EE0D04523FD6EB300D0C060 /* Toast.swift in Sources */, + 0EE0D0C923FD7E0100D0C060 /* ANAdAdapterBaseDFP.m in Sources */, + 0EE0D0C823FD7E0100D0C060 /* ANAdAdapterBannerDFP.m in Sources */, + 0E5660EA23BE39AF0088EB36 /* AppDelegate.swift in Sources */, + 0EE0D0CE23FD7E0100D0C060 /* ANAdAdapterBannerFacebook.m in Sources */, + 0EE0D04C23FD728200D0C060 /* AdmobDFPInterstitialAdViewController.swift in Sources */, + 0EE0D04A23FD723800D0C060 /* AdmobDFPBannerAdViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0E82E4C8245CC33500EC19E1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E82E4D3245CC33500EC19E1 /* SimpleCSRAdTypeListViewController.swift in Sources */, + 0E82E508245CD27C00EC19E1 /* ANAdAdapterCSRNativeBannerFacebook.m in Sources */, + 0E82E509245CD27C00EC19E1 /* ANFBSettings.m in Sources */, + 0E82E4E1245CC34D00EC19E1 /* FacebookCSRNativeBanner.swift in Sources */, + 0E82E4E4245CC6B600EC19E1 /* Toast.swift in Sources */, + 0E82E4CF245CC33500EC19E1 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 0E5660EF23BE39AF0088EB36 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0E5660F023BE39AF0088EB36 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0E82E4D4245CC33500EC19E1 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0E82E4D5245CC33500EC19E1 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0E82E4D9245CC33600EC19E1 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0E82E4DA245CC33600EC19E1 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; + 0EE0D03E23FD6D1D00D0C060 /* VideoAd.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0EE0D03F23FD6D1D00D0C060 /* Base */, + ); + name = VideoAd.storyboard; + sourceTree = ""; + }; + 0EE0D04623FD6EEC00D0C060 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0EE0D04723FD6EEC00D0C060 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0E5660F823BE39B10088EB36 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_BITCODE = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 0E5660F923BE39B10088EB36 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_BITCODE = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0E5660FB23BE39B10088EB36 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 941E857F252A95374E5394AF /* Pods-SimpleMediation.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 9TBTYSQH6V; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/SimpleMediation/SupportingFiles/mediatedsdk\"/**", + "\"$(SRCROOT)/SimpleMediation/SupportingFiles/mediatedsdk/FacebookSDK\"/**", + ); + INFOPLIST_FILE = SimpleMediation/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleMediation; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "SimpleMediation/SupportingFiles/SimpleMediation-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0E5660FC23BE39B10088EB36 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7E9D464632CE623986E47C03 /* Pods-SimpleMediation.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 9TBTYSQH6V; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/SimpleMediation/SupportingFiles/mediatedsdk\"/**", + "\"$(SRCROOT)/SimpleMediation/SupportingFiles/mediatedsdk/FacebookSDK\"/**", + ); + INFOPLIST_FILE = SimpleMediation/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleMediation; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "SimpleMediation/SupportingFiles/SimpleMediation-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 0E82E4DE245CC33600EC19E1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 92D9B61421003C0822F05D3F /* Pods-SimpleCSR.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = SimpleCSR/SupportingFile/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleCSR; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "SimpleCSR/SupportingFile/SimpleCSR-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0E82E4DF245CC33600EC19E1 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F8136949A8662F8B5D433773 /* Pods-SimpleCSR.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = SimpleCSR/SupportingFile/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleCSR; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "SimpleCSR/SupportingFile/SimpleCSR-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0E5660E123BE39AF0088EB36 /* Build configuration list for PBXProject "SimpleMediation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E5660F823BE39B10088EB36 /* Debug */, + 0E5660F923BE39B10088EB36 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0E5660FA23BE39B10088EB36 /* Build configuration list for PBXNativeTarget "SimpleMediation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E5660FB23BE39B10088EB36 /* Debug */, + 0E5660FC23BE39B10088EB36 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0E82E4DD245CC33600EC19E1 /* Build configuration list for PBXNativeTarget "SimpleCSR" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E82E4DE245CC33600EC19E1 /* Debug */, + 0E82E4DF245CC33600EC19E1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0E5660DE23BE39AF0088EB36 /* Project object */; +} diff --git a/examples/SimpleMediation/SimpleMediation.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/SimpleMediation/SimpleMediation.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..97c70a06b --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/SimpleMediation/SimpleMediation/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d8db8d65f --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/SimpleMediation/SimpleMediation/Assets.xcassets/Contents.json b/examples/SimpleMediation/SimpleMediation/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/SimpleMediation/SimpleMediation/Base.lproj/LaunchScreen.storyboard b/examples/SimpleMediation/SimpleMediation/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/Base.lproj/VideoAd.storyboard b/examples/SimpleMediation/SimpleMediation/Base.lproj/VideoAd.storyboard new file mode 100644 index 000000000..9bc09ba4b --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/Base.lproj/VideoAd.storyboard @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/Info.plist b/examples/SimpleMediation/SimpleMediation/Info.plist new file mode 100644 index 000000000..72f73ac71 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/Info.plist @@ -0,0 +1,55 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + GADIsAdManagerApp + + LSApplicationQueriesSchemes + + tel + appnexuspb + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeAd.storyboard new file mode 100644 index 000000000..52f4c23c9 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeAd.storyboard @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeViewController.swift new file mode 100644 index 000000000..1a63b9338 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdMobDFPNativeViewController.swift @@ -0,0 +1,88 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK +import GoogleMobileAds +class AdMobDFPNativeViewController: UIViewController , ANNativeAdRequestDelegate , ANNativeAdDelegate { + + var gadNativeAdView: GADUnifiedNativeAdView? + var nativeAdRequest: ANNativeAdRequest? + var nativeAdResponse: ANNativeAdResponse? + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + nativeAdRequest = ANNativeAdRequest() + nativeAdRequest!.placementId = "18144598" + nativeAdRequest!.shouldLoadIconImage = true + nativeAdRequest!.shouldLoadMainImage = true + nativeAdRequest!.delegate = self + nativeAdRequest!.loadAd() + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + + } + + // MARK: - ANNativeAdRequestDelegate & ANNativeAdDelegate + + func adRequest(_ request: ANNativeAdRequest, didReceive response: ANNativeAdResponse) { + self.nativeAdResponse = response + self.nativeAdResponse?.delegate = self + self.nativeAdResponse?.clickThroughAction = ANClickThroughAction.openSDKBrowser + createGADNativeAdView() + populateGADUnifiedNativeViewWithResponse() + Toast.show(message:"Ad did receive ad", controller: self) + } + func createGADNativeAdView() { + let adNib = UINib(nibName: "UnifiedNativeAdView", bundle: Bundle(for: type(of: self))) + let array = adNib.instantiate(withOwner: self, options: nil) + gadNativeAdView = (array.first as! GADUnifiedNativeAdView) + } + + func populateGADUnifiedNativeViewWithResponse() { + let nativeAdView = gadNativeAdView + (nativeAdView?.headlineView as? UILabel)?.text = self.nativeAdResponse?.title + + (nativeAdView?.bodyView as? UILabel)?.text = self.nativeAdResponse?.body + + + (nativeAdView?.callToActionView as? UIButton)?.setTitle(self.nativeAdResponse?.callToAction, for: .normal) + + (nativeAdView?.iconView as? UIImageView)?.image = self.nativeAdResponse?.iconImage + + // Main Image is automatically added by GoogleSDK in the MediaView + + (nativeAdView?.advertiserView as? UILabel)?.text = self.nativeAdResponse?.sponsoredBy + + + self.view.addSubview(self.gadNativeAdView!) + + do { + let rvc = (UIApplication.shared.keyWindow?.rootViewController)! + + try nativeAdResponse!.registerView(forTracking: self.gadNativeAdView!, withRootViewController: rvc, clickableViews: [(nativeAdView?.callToActionView) as Any]) + } catch { + Toast.show(message: "Failed to registerView for Tracking", controller: self) + } + } + + func adRequest(_ request: ANNativeAdRequest, didFailToLoadWithError error: Error, with adResponseInfo: ANAdResponseInfo?) { + Toast.show(message: "ad requestFailedWithError \(error)", controller: self) + } + +} + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAd.storyboard new file mode 100644 index 000000000..ecf376eff --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAdViewController.swift new file mode 100644 index 000000000..71545b183 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPBannerAdViewController.swift @@ -0,0 +1,66 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class AdmobDFPBannerAdViewController: UIViewController , ANBannerAdViewDelegate{ + var banner: ANBannerAdView? + + let kPlacementId = "18144580" + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + let adWidth: Int = 320 + let adHeight: Int = 50 + + // We want to center our ad on the screen. + let screenRect: CGRect = UIScreen.main.bounds + let originX: CGFloat = (screenRect.size.width / 2) - CGFloat((adWidth / 2)) + let originY: CGFloat = (screenRect.size.height / 2) - CGFloat((adHeight / 2)) + // Needed for when we create our ad view. + + let rect = CGRect(origin: CGPoint(x: originX,y :originY), size: CGSize(width: adWidth, height: adHeight)) + + let size = CGSize(width: adWidth, height: adHeight) + + // Make a banner ad view. + let banner = ANBannerAdView(frame: rect, placementId: kPlacementId, adSize: size) + banner.rootViewController = self + banner.delegate = self + banner.clickThroughAction = ANClickThroughAction.openSDKBrowser + + // Since this example is for testing, we'll turn on PSAs and verbose logging. + banner.shouldServePublicServiceAnnouncements = false + // Load an ad. + banner.loadAd() + view.addSubview(banner) + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + + } + + // MARK: - ANBannerAdViewDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + } + + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAd.storyboard new file mode 100644 index 000000000..b91634c21 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAdViewController.swift new file mode 100644 index 000000000..bd3558d76 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/AdmobDFPInterstitialAdViewController.swift @@ -0,0 +1,45 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class AdmobDFPInterstitialAdViewController: UIViewController , ANInterstitialAdDelegate { + + var interstitialAd: ANInterstitialAd? + let kPlacementId = "18144585" + + + override func viewDidLoad() { + + super.viewDidLoad() + interstitialAd = ANInterstitialAd(placementId: kPlacementId) + interstitialAd!.delegate = self + interstitialAd!.clickThroughAction = ANClickThroughAction.openSDKBrowser + interstitialAd!.load() + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + } + + // MARK: - ANInterstitialAdDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + interstitialAd!.display(from: self) + } + + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/UnifiedNativeAdView.xib b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/UnifiedNativeAdView.xib new file mode 100644 index 000000000..e917fe323 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Admob/UnifiedNativeAdView.xib @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAd.storyboard new file mode 100644 index 000000000..0a8c941d3 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAdViewController.swift new file mode 100644 index 000000000..881e5c17b --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookBannerAdViewController.swift @@ -0,0 +1,68 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class FacebookBannerAdViewController: UIViewController , ANBannerAdViewDelegate{ + var banner: ANBannerAdView? + + let kPlacementId = "18596931" + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + let adWidth: Int = 320 + let adHeight: Int = 50 + + // We want to center our ad on the screen. + let screenRect: CGRect = UIScreen.main.bounds + let originX: CGFloat = (screenRect.size.width / 2) - CGFloat((adWidth / 2)) + let originY: CGFloat = (screenRect.size.height / 2) - CGFloat((adHeight / 2)) + // Needed for when we create our ad view. + + let rect = CGRect(origin: CGPoint(x: originX,y :originY), size: CGSize(width: adWidth, height: adHeight)) + + let size = CGSize(width: adWidth, height: adHeight) + + // Make a banner ad view. + let banner = ANBannerAdView(frame: rect, placementId: kPlacementId, adSize: size) + banner.rootViewController = self + banner.delegate = self + banner.clickThroughAction = ANClickThroughAction.openSDKBrowser + + // Since this example is for testing, we'll turn on PSAs and verbose logging. + banner.shouldServePublicServiceAnnouncements = false + // Load an ad. + banner.loadAd() + view.addSubview(banner) + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + + } + + + + // MARK: - ANBannerAdViewDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + } + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAd.storyboard new file mode 100644 index 000000000..bbce62328 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAdViewController.swift new file mode 100644 index 000000000..e85558a45 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookInterstitialAdViewController.swift @@ -0,0 +1,45 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class FacebookInterstitialAdViewController: UIViewController , ANInterstitialAdDelegate { + + var interstitialAd: ANInterstitialAd? + let kPlacementId = "18596931" + + + override func viewDidLoad() { + + super.viewDidLoad() + interstitialAd = ANInterstitialAd(placementId: kPlacementId) + interstitialAd!.delegate = self + interstitialAd!.clickThroughAction = ANClickThroughAction.openSDKBrowser + interstitialAd!.load() + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + } + + // MARK: - ANInterstitialAdDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + interstitialAd!.display(from: self) + } + + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNative.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNative.storyboard new file mode 100644 index 000000000..f3eceb07f --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNative.storyboard @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNativeViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNativeViewController.swift new file mode 100644 index 000000000..da4537c90 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/Facebook/FacebookNativeViewController.swift @@ -0,0 +1,108 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK +import FBAudienceNetwork +class FacebookNativeViewController: UIViewController , ANNativeAdRequestDelegate , ANNativeAdDelegate { + + @IBOutlet var adIconView: FBMediaView! + @IBOutlet var adCoverMediaView: FBMediaView! + @IBOutlet var adTitleLabel: UILabel! + @IBOutlet var adBodyLabel: UILabel! + @IBOutlet var adCallToActionButton: UIButton! + @IBOutlet var adSocialContextLabel: UILabel! + @IBOutlet var sponsoredLabel: UILabel! + @IBOutlet var adOptionsView: FBAdOptionsView! + @IBOutlet var adUIView: UIView! + var nativeAd: FBNativeAd? + + + var nativeAdRequest: ANNativeAdRequest? + var nativeAdResponse: ANNativeAdResponse? + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + ANSDKSettings.sharedInstance().httpsEnabled = true + + FBAdSettings.addTestDevice(FBAdSettings.testDeviceHash()) + + nativeAdRequest = ANNativeAdRequest() + nativeAdRequest!.placementId = "18596931" + nativeAdRequest!.shouldLoadIconImage = true + nativeAdRequest!.shouldLoadMainImage = true + nativeAdRequest!.delegate = self + nativeAdRequest!.loadAd() + } + + + func adRequest(_ request: ANNativeAdRequest, didReceive response: ANNativeAdResponse) { + Toast.show(message: "adDidReceiveAd", controller: self) + adUIView.isHidden = false + self.nativeAdResponse = response + let nativeAd = response.customElements![kANNativeElementObject] as? FBNativeAd + facebookNativeAdDidLoad(nativeAd) + } + + func facebookNativeAdDidLoad(_ nativeAd: FBNativeAd?) { + + Toast.show(message: "Native ad was loaded, constructing native UI...", controller: self) + + if (nativeAd != nil) { + nativeAd!.unregisterView() + } + + // Render native ads onto UIView + adTitleLabel.text = nativeAd?.advertiserName + adBodyLabel.text = nativeAd?.bodyText + adSocialContextLabel.text = nativeAd?.socialContext + sponsoredLabel.text = nativeAd?.sponsoredTranslation + + self.adCallToActionButton.titleLabel?.text = nativeAd?.callToAction + // set the frame of the adBodyLabel depending on whether to show to call to action button + let gapToBorder: CGFloat = 9.0 + let gapToCTAButton: CGFloat = 8.0 + var adBodyLabelFrame = adBodyLabel.frame + if !(nativeAd!.callToAction != nil) { + adBodyLabelFrame.size.width = adCoverMediaView.bounds.size.width - gapToBorder * 2 + } else { + adBodyLabelFrame.size.width = adCoverMediaView.bounds.size.width - gapToCTAButton - gapToBorder - (adCoverMediaView.bounds.size.width - adCallToActionButton.frame.origin.x) + } + adBodyLabel.frame = adBodyLabelFrame + print("Register UIView for impression and click...") + // Specify the clickable areas. Views you were using to set ad view tags should be clickable. + let clickableViews = [ + adIconView, + adTitleLabel, + adBodyLabel, + adSocialContextLabel, + adCallToActionButton, + adCoverMediaView + ] + do { + try nativeAdResponse!.registerView(forTracking: adUIView, withRootViewController: self, clickableViews: clickableViews as [Any]) + } catch let registerError { + print(registerError) + } + + } + func adRequest(_ request: ANNativeAdRequest, didFailToLoadWithError error: Error, with adResponseInfo: ANAdResponseInfo?) { + Toast.show(message: "ad requestFailedWithError \(error)", controller: self) + } + +} + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAd.storyboard new file mode 100644 index 000000000..2a4c3f281 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAdViewController.swift new file mode 100644 index 000000000..ad45297e9 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdBannerAdViewController.swift @@ -0,0 +1,68 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class SmartAdBannerAdViewController: UIViewController , ANBannerAdViewDelegate{ + var banner: ANBannerAdView? + + let kPlacementId = "10263964" + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + let adWidth: Int = 320 + let adHeight: Int = 50 + + // We want to center our ad on the screen. + let screenRect: CGRect = UIScreen.main.bounds + let originX: CGFloat = (screenRect.size.width / 2) - CGFloat((adWidth / 2)) + let originY: CGFloat = (screenRect.size.height / 2) - CGFloat((adHeight / 2)) + // Needed for when we create our ad view. + + let rect = CGRect(origin: CGPoint(x: originX,y :originY), size: CGSize(width: adWidth, height: adHeight)) + + let size = CGSize(width: adWidth, height: adHeight) + + // Make a banner ad view. + let banner = ANBannerAdView(frame: rect, placementId: kPlacementId, adSize: size) + banner.rootViewController = self + banner.delegate = self + banner.clickThroughAction = ANClickThroughAction.openSDKBrowser + + // Since this example is for testing, we'll turn on PSAs and verbose logging. + banner.shouldServePublicServiceAnnouncements = false + // Load an ad. + banner.loadAd() + view.addSubview(banner) + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + + } + + + + // MARK: - ANBannerAdViewDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + } + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAd.storyboard b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAd.storyboard new file mode 100644 index 000000000..f4fef123c --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAd.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAdViewController.swift new file mode 100644 index 000000000..59cd5f48b --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/SmartAd/SmartAdInterstitialAdViewController.swift @@ -0,0 +1,45 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class SmartAdInterstitialAdViewController: UIViewController , ANInterstitialAdDelegate { + + var interstitialAd: ANInterstitialAd? + let kPlacementId = "10263953" + + + override func viewDidLoad() { + + super.viewDidLoad() + interstitialAd = ANInterstitialAd(placementId: kPlacementId) + interstitialAd!.delegate = self + interstitialAd!.clickThroughAction = ANClickThroughAction.openSDKBrowser + interstitialAd!.load() + + Toast.show(message: "Loading Ad...!! Please wait", controller: self) + } + + // MARK: - ANInterstitialAdDelegate + func adDidReceiveAd(_ ad: Any) { + Toast.show(message: "adDidReceiveAd", controller: self) + interstitialAd!.display(from: self) + } + + func ad(_ ad: Any, requestFailedWithError error: Error) { + Toast.show(message: "adFailed", controller: self) + } +} diff --git a/examples/SimpleMediation/SimpleMediation/MediationViewController/VideoAd/VideoAdViewController.swift b/examples/SimpleMediation/SimpleMediation/MediationViewController/VideoAd/VideoAdViewController.swift new file mode 100644 index 000000000..89e56c3e4 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/MediationViewController/VideoAd/VideoAdViewController.swift @@ -0,0 +1,221 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +import UIKit +import AppNexusSDK + +class VideoAdViewController: UIViewController , ANInstreamVideoAdLoadDelegate, ANInstreamVideoAdPlayDelegate { + + + var placementId = "14790206" + + + @IBOutlet weak var videoView: UIView! + @IBOutlet weak var logTextView: UITextView! + /// Frame for video view in portrait mode. + var portraitVideoViewFrame = CGRect.zero + /// Frame for video player in fullscreen mode. + var fullscreenVideoFrame = CGRect.zero + var videoAd: ANInstreamVideoAd? + var videoContentPlayer: AVPlayer? + @IBOutlet weak var playButton: UIButton! + var isvideoAdAvailable = false + + + override func viewDidLoad() { + super.viewDidLoad() + + ANSDKSettings.sharedInstance().httpsEnabled = true + playButton.layer.zPosition = CGFloat(MAXFLOAT) + isvideoAdAvailable = false + ANSDKSettings.sharedInstance().httpsEnabled = false + // Fix iPhone issue of log text starting in the middle of the UITextView + automaticallyAdjustsScrollViewInsets = false + portraitVideoViewFrame = videoView.frame + + + if UIDevice.current.orientation == .landscapeLeft || UIDevice.current.orientation == .landscapeRight { + viewDidEnterLandscape() + } + + setupContentPlayer() + videoAd = ANInstreamVideoAd(placementId: placementId) + videoAd?.clickThroughAction = ANClickThroughAction.openSDKBrowser + videoAd?.load(with: self) + + // Do any additional setup after loading the view. + } + + @IBAction func playButton_Touch(_ sender: Any) { + playButton.isHidden = true + if isvideoAdAvailable == false { + videoContentPlayer!.play() + } else { + videoContentPlayer!.pause() + videoAd?.play(withContainer: videoView, with: self) + isvideoAdAvailable = false + } + } + override func didRotate(from interfaceOrientation: UIInterfaceOrientation) { + switch interfaceOrientation { + case .landscapeLeft, .landscapeRight: + viewDidEnterPortrait() + case .portrait, .portraitUpsideDown: + viewDidEnterLandscape() + case .unknown: + break + @unknown default: + break + } + } + + func setupContentPlayer() { + let contentURL = URL(string: "https://acdn.adnxs.com/mobile/video_test/content/Scenario.mp4") + if let contentURL = contentURL { + videoContentPlayer = AVPlayer(url: contentURL) + } + if let contentURL = contentURL { + videoContentPlayer = AVPlayer(url: contentURL) + } + let playerLayer = AVPlayerLayer(player: videoContentPlayer) + playerLayer.frame = videoView.bounds + videoView.layer.addSublayer(playerLayer) + videoView.setNeedsLayout() + videoView.translatesAutoresizingMaskIntoConstraints = true + NotificationCenter.default.addObserver(self, selector: #selector(self.itemDidFinishPlaying(_:)), name: .AVPlayerItemDidPlayToEndTime, object: videoContentPlayer?.currentItem) + } + + func viewDidEnterLandscape() { + let screenRect: CGRect = UIScreen.main.bounds + fullscreenVideoFrame = CGRect(x: 0, y: 0, width: screenRect.size.width, height: screenRect.size.height) + videoView.frame = fullscreenVideoFrame + } + + func viewDidEnterPortrait() { + videoView.frame = portraitVideoViewFrame + } + + + override func viewDidDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + } + + @objc func itemDidFinishPlaying(_ notification: Notification?) { + print("finished playing content") + //cleanup the player & start again + videoContentPlayer = nil + setupContentPlayer() + playButton.isHidden = false + isvideoAdAvailable = false + } + + func getAdPlayElapsedTime() { + // To get AdPlayElapsedTime + let getAdPlayElapsedTime = videoAd!.getPlayElapsedTime() + logMessage("getAdPlayElapsedTime \(getAdPlayElapsedTime)") + + } + + // MARK: - ANInstreamVideoAdDelegate. + func adDidReceiveAd(_ ad: Any) { + // To get AdDuration + let getAdDuration = videoAd!.getDuration() + logMessage("getAdDuration \(getAdDuration)") + + // To get CreativeURL + let getCreativeURL = videoAd!.getCreativeURL() + logMessage("getCreativeURL \(String(describing: getCreativeURL))") + + // To get VastURL + let getVastURL = videoAd!.getVastURL() + logMessage("getVastURL \(String(describing: getVastURL))") + + // To get VastXML + let getVastXML = videoAd!.getVastXML() + logMessage("getVastXML \(String(describing: getVastXML))") + + // To get AdPlayElapsedTime + getAdPlayElapsedTime() + isvideoAdAvailable = true + + logMessage("adDidReceiveAd") + + } + + func ad(_ ad: ANAdProtocol, requestFailedWithError error: Error) { + + } + func ad(_ ad: ANAdProtocol?) throws { + isvideoAdAvailable = false + } + + //----------------------------- -o- + func adCompletedFirstQuartile(_ ad: ANAdProtocol) { + getAdPlayElapsedTime() + } + + func adCompletedMidQuartile(_ ad: ANAdProtocol) { + getAdPlayElapsedTime() + + } + //----------------------------- -o- + func adPlayStarted(_ ad: ANAdProtocol) { + getAdPlayElapsedTime() + + } + + func adCompletedThirdQuartile(_ ad: ANAdProtocol) { + getAdPlayElapsedTime() + } + + + func adWasClicked(_ ad: ANAdProtocol) { + + } + + func adMute(_ ad: ANAdProtocol, withStatus muteStatus: Bool) { + if muteStatus == true { + logMessage("adMuteOn") + } else { + logMessage("adMuteOff") + } + } + + func adDidComplete(_ ad: ANAdProtocol, with state: ANInstreamVideoPlaybackStateType) { + if state == ANInstreamVideoPlaybackStateType.skipped { + logMessage("adWasSkipped") + } else if state == ANInstreamVideoPlaybackStateType.error { + logMessage("adplaybackFailedWithError") + } else if state == ANInstreamVideoPlaybackStateType.completed { + logMessage("adPlayCompleted") + getAdPlayElapsedTime() + } + isvideoAdAvailable = false + videoContentPlayer!.play() + + } + + + func logMessage(_ log: String?) { + let logString = "\(log ?? "")\n" + logTextView.text = logTextView.text + (logString) + if logTextView.text.count > 0 { + let bottom = NSRange(location: logTextView.text.count - 1, length: 1) + logTextView.scrollRangeToVisible(bottom) + } + } + +} + diff --git a/examples/SimpleMediation/SimpleMediation/NavigationViewController/Base.lproj/Main.storyboard b/examples/SimpleMediation/SimpleMediation/NavigationViewController/Base.lproj/Main.storyboard new file mode 100644 index 000000000..08c710bce --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/NavigationViewController/Base.lproj/Main.storyboard @@ -0,0 +1,513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/SimpleMediation/SimpleMediation/NavigationViewController/SimpleMediationAdTypeListViewController.swift b/examples/SimpleMediation/SimpleMediation/NavigationViewController/SimpleMediationAdTypeListViewController.swift new file mode 100644 index 000000000..5fc99b4ad --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/NavigationViewController/SimpleMediationAdTypeListViewController.swift @@ -0,0 +1,27 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +import Foundation +import UIKit + +class SimpleMediationAdTypeListViewController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } +} + diff --git a/examples/SimpleMediation/SimpleMediation/SupportingFiles/AppDelegate.swift b/examples/SimpleMediation/SimpleMediation/SupportingFiles/AppDelegate.swift new file mode 100644 index 000000000..b5edbb647 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/SupportingFiles/AppDelegate.swift @@ -0,0 +1,31 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +import UIKit +import AppNexusSDK +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + return true + } +} + diff --git a/examples/SimpleMediation/SimpleMediation/SupportingFiles/SimpleMediation-Bridging-Header.h b/examples/SimpleMediation/SimpleMediation/SupportingFiles/SimpleMediation-Bridging-Header.h new file mode 100644 index 000000000..f38a2bff9 --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/SupportingFiles/SimpleMediation-Bridging-Header.h @@ -0,0 +1,15 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + diff --git a/examples/SimpleMediation/SimpleMediation/SupportingFiles/Toast.swift b/examples/SimpleMediation/SimpleMediation/SupportingFiles/Toast.swift new file mode 100644 index 000000000..ab86e0ddb --- /dev/null +++ b/examples/SimpleMediation/SimpleMediation/SupportingFiles/Toast.swift @@ -0,0 +1,65 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + + + +import UIKit +import Foundation + +class Toast { + static func show(message: String, controller: UIViewController) { + let toastView = UIView(frame: CGRect()) + toastView.backgroundColor = UIColor.black.withAlphaComponent(0.6) + toastView.alpha = 0.0 + toastView.layer.cornerRadius = 25; + toastView.clipsToBounds = true + + let toastTitle = UILabel(frame: CGRect()) + toastTitle.textColor = UIColor.white + toastTitle.textAlignment = .center; + toastTitle.font.withSize(12.0) + toastTitle.text = message + toastTitle.clipsToBounds = true + toastTitle.numberOfLines = 0 + + toastView.addSubview(toastTitle) + controller.view.addSubview(toastView) + + toastTitle.translatesAutoresizingMaskIntoConstraints = false + toastView.translatesAutoresizingMaskIntoConstraints = false + + let a1 = NSLayoutConstraint(item: toastTitle, attribute: .leading, relatedBy: .equal, toItem: toastView, attribute: .leading, multiplier: 1, constant: 15) + let a2 = NSLayoutConstraint(item: toastTitle, attribute: .trailing, relatedBy: .equal, toItem: toastView, attribute: .trailing, multiplier: 1, constant: -15) + let a3 = NSLayoutConstraint(item: toastTitle, attribute: .bottom, relatedBy: .equal, toItem: toastView, attribute: .bottom, multiplier: 1, constant: -15) + let a4 = NSLayoutConstraint(item: toastTitle, attribute: .top, relatedBy: .equal, toItem: toastView, attribute: .top, multiplier: 1, constant: 15) + toastView.addConstraints([a1, a2, a3, a4]) + + let c1 = NSLayoutConstraint(item: toastView, attribute: .leading, relatedBy: .equal, toItem: controller.view, attribute: .leading, multiplier: 1, constant: 65) + let c2 = NSLayoutConstraint(item: toastView, attribute: .trailing, relatedBy: .equal, toItem: controller.view, attribute: .trailing, multiplier: 1, constant: -65) + let c3 = NSLayoutConstraint(item: toastView, attribute: .bottom, relatedBy: .equal, toItem: controller.view, attribute: .bottom, multiplier: 1, constant: -75) + controller.view.addConstraints([c1, c2, c3]) + + UIView.animate(withDuration: 0.5, delay: 0.0, options: .curveEaseIn, animations: { + toastView.alpha = 1.0 + }, completion: { _ in + UIView.animate(withDuration: 0.5, delay: 1.5, options: .curveEaseOut, animations: { + toastView.alpha = 0.0 + }, completion: {_ in + toastView.removeFromSuperview() + }) + }) + } +} diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m index ee30d6853..c6b2420dc 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerAdMob.m @@ -15,7 +15,6 @@ #import "ANAdAdapterBannerAdMob.h" #import "ANAdAdapterBaseDFP.h" - @interface ANAdAdapterBannerAdMob () @property (nonatomic, readwrite, strong) GADBannerView *bannerView; @end @@ -56,20 +55,19 @@ - (void)requestBannerAdWithSize:(CGSize)size UIApplication *application = [UIApplication sharedApplication]; BOOL orientationIsPortrait = UIInterfaceOrientationIsPortrait([application statusBarOrientation]); if(orientationIsPortrait) { - gadAdSize = kGADAdSizeSmartBannerPortrait; + gadAdSize = GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth(size.width); } else { - gadAdSize = kGADAdSizeSmartBannerLandscape; + gadAdSize = GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(size.height); } } else { gadAdSize = GADAdSizeFromCGSize(size); } self.bannerView = [[GADBannerView alloc] initWithAdSize:gadAdSize]; - self.bannerView.adUnitID = idString; - - self.bannerView.rootViewController = rootViewController; - self.bannerView.delegate = self; - [self.bannerView loadRequest:[self createRequestFromTargetingParameters:targetingParameters]]; + self.bannerView.adUnitID = idString; + self.bannerView.rootViewController = rootViewController; + self.bannerView.delegate = self; + [self.bannerView loadRequest:[self createRequestFromTargetingParameters:targetingParameters]]; } - (GADRequest *)createRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters { @@ -95,83 +93,34 @@ - (AdMobBannerServerSideParameters*) parseServerSide:(NSString*) serverSideParam #pragma mark GADBannerViewDelegate -- (void)adViewDidReceiveAd:(GADBannerView *)view +- (void)bannerViewDidReceiveAd:(nonnull GADBannerView *)bannerView { ANLogDebug(@"AdMob banner did load"); - [self.delegate didLoadBannerAd:view]; + [self.delegate didLoadBannerAd:bannerView]; } - -- (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error +- (void)bannerView:(nonnull GADBannerView *)bannerView didFailToReceiveAdWithError:(nonnull NSError *)error { ANLogDebug(@"AdMob banner failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case kGADErrorInvalidRequest: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case kGADErrorNetworkError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorServerError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorOSVersionTooLow: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorAdAlreadyUsed: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationDataError: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorMediationAdapterError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationInvalidAdSize: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorInternalError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorInvalidArgument: - code = ANAdResponseCode.INVALID_REQUEST; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } - - [self.delegate didFailToLoadAd:code]; + [self.delegate didFailToLoadAd:[ANAdAdapterBaseDFP responseCodeFromRequestError:error]]; } -- (void)adViewWillPresentScreen:(GADBannerView *)adView { +- (void)bannerViewWillPresentScreen:(nonnull GADBannerView *)bannerView{ [self.delegate willPresentAd]; } -- (void)adViewWillDismissScreen:(GADBannerView *)adView { +- (void)bannerViewWillDismissScreen:(nonnull GADBannerView *)bannerView { [self.delegate willCloseAd]; } -- (void)adViewDidDismissScreen:(GADBannerView *)adView { +- (void)bannerViewDidDismissScreen:(nonnull GADBannerView *)bannerView { [self.delegate didCloseAd]; } -- (void)adViewWillLeaveApplication:(GADBannerView *)adView { - [self.delegate willLeaveApplication]; -} - - (void)dealloc { ANLogDebug(@"AdMob banner being destroyed"); - self.bannerView.delegate = nil; - self.bannerView = nil; + self.bannerView.delegate = nil; + self.bannerView = nil; } @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m index 56eaaf420..cd3a601f8 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBannerDFP.m @@ -45,8 +45,8 @@ @implementation DFPBannerServerSideParameters @interface ANAdAdapterBannerDFP () -@property (nonatomic, readwrite, strong) DFPBannerView *dfpBanner; -@property (nonatomic, readwrite, strong) DFPRequest *dfpRequest; +@property (nonatomic, readwrite, strong) GAMBannerView *dfpBanner; +@property (nonatomic, readwrite, strong) GAMRequest *dfpRequest; @property (nonatomic, readwrite) BOOL secondPriceIsHigher; @property (nonatomic, readwrite) BOOL secondPriceAvailable; @property (nonatomic, retain) NSTimer *timer; @@ -79,16 +79,14 @@ - (void)requestBannerAdWithSize:(CGSize)size UIApplication *application = [UIApplication sharedApplication]; BOOL orientationIsPortrait = UIInterfaceOrientationIsPortrait([application statusBarOrientation]); if(orientationIsPortrait) { - gadAdSize = kGADAdSizeSmartBannerPortrait; + gadAdSize = GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth(size.width); } else { - gadAdSize = kGADAdSizeSmartBannerLandscape; + gadAdSize = GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(size.height); } } else { gadAdSize = GADAdSizeFromCGSize(size); } - - // self.dfpRequest = [ANAdAdapterBaseDFP dfpRequestFromTargetingParameters:targetingParameters ]; self.secondPriceAvailable = NO; if (ssparam.secondPrice) { @@ -103,9 +101,7 @@ - (void)requestBannerAdWithSize:(CGSize)size } } - - // - self.dfpBanner = [[DFPBannerView alloc] initWithAdSize:gadAdSize]; + self.dfpBanner = [[GAMBannerView alloc] initWithAdSize:gadAdSize]; self.dfpBanner.adUnitID = idString; self.dfpBanner.rootViewController = rootViewController; self.dfpBanner.delegate = self; @@ -154,8 +150,7 @@ -(void)adReceiveAd{ } #pragma mark - GADBannerViewDelegate - -- (void)adViewDidReceiveAd:(DFPBannerView *)view +- (void)bannerViewDidReceiveAd:(GAMBannerView *)bannerView { ANLogDebug(@"DFP banner did load"); if (!self.secondPriceAvailable) { @@ -165,69 +160,29 @@ - (void)adViewDidReceiveAd:(DFPBannerView *)view } } -- (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error -{ +- (void)bannerView:(nonnull GADBannerView *)bannerView didFailToReceiveAdWithError:(nonnull NSError *)error{ ANLogDebug(@"DFP banner failed to load with error: %@", [error localizedDescription]); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case kGADErrorInvalidRequest: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case kGADErrorNetworkError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorServerError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorOSVersionTooLow: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorAdAlreadyUsed: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationDataError: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorMediationAdapterError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationInvalidAdSize: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorInternalError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorInvalidArgument: - code = ANAdResponseCode.INVALID_REQUEST; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } [self.timer invalidate]; - [self.delegate didFailToLoadAd:code]; + [self.delegate didFailToLoadAd:[ANAdAdapterBaseDFP responseCodeFromRequestError:error]]; +} + +- (void)bannerViewDidRecordImpression:(nonnull GADBannerView *)bannerView{ + ANLogDebug(@"DFP banner impression recorded"); } -- (void)adViewWillPresentScreen:(DFPBannerView *)adView { +- (void)bannerViewWillPresentScreen:(GAMBannerView *)adView { [self.delegate willPresentAd]; } -- (void)adViewWillDismissScreen:(DFPBannerView *)adView { +- (void)bannerViewWillDismissScreen:(nonnull GADBannerView *)bannerView { [self.delegate willCloseAd]; } -- (void)adViewDidDismissScreen:(DFPBannerView *)adView { +- (void)bannerViewDidDismissScreen:(nonnull GADBannerView *)bannerView { [self.delegate didCloseAd]; } -- (void)adViewWillLeaveApplication:(DFPBannerView *)adView { +- (void)adViewWillLeaveApplication:(GAMBannerView *)adView { [self.delegate willLeaveApplication]; } @@ -238,12 +193,9 @@ - (void)dealloc self.dfpBanner = nil; } - - - #pragma mark - GADAppEventDelegate -- (void) adView: (DFPBannerView *)banner +- (void) adView: (GAMBannerView *)banner didReceiveAppEvent: (NSString *)name withInfo: (NSString *)info { diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.h b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.h index 73c0f7a4c..e36848fc0 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.h +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.h @@ -29,8 +29,7 @@ @interface ANAdAdapterBaseDFP : NSObject + (GADRequest *)googleAdRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters; -+ (DFPRequest *)dfpRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters; - -+ (ANAdResponseCode *)responseCodeFromRequestError:(GADRequestError *)error; ++ (GAMRequest *)dfpRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters; ++ (ANAdResponseCode *)responseCodeFromRequestError:(NSError *)error; @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m index fb7b5c492..078d4969d 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterBaseDFP.m @@ -24,10 +24,10 @@ + (GADRequest *)googleAdRequestFromTargetingParameters:(ANTargetingParameters *) return [[self class] completeAdRequest:request fromTargetingParameters:targetingParameters]; } -+ (DFPRequest *)dfpRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters ++ (GAMRequest *)dfpRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters { - DFPRequest *dfpRequest = [DFPRequest request]; - return (DFPRequest *)[[self class] completeAdRequest:dfpRequest fromTargetingParameters:targetingParameters]; + GAMRequest *dfpRequest = [GAMRequest request]; + return (GAMRequest *)[[self class] completeAdRequest:dfpRequest fromTargetingParameters:targetingParameters]; } + (GADRequest *)completeAdRequest: (GADRequest *)gadRequest @@ -67,44 +67,53 @@ + (GADRequest *)completeAdRequest: (GADRequest *)gadRequest } -+ (ANAdResponseCode *)responseCodeFromRequestError:(GADRequestError *)error { ++ (ANAdResponseCode *)responseCodeFromRequestError:(NSError *)error { ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; switch (error.code) { - case kGADErrorInvalidRequest: + case GADErrorInvalidRequest: code = ANAdResponseCode.INVALID_REQUEST; break; - case kGADErrorNoFill: + case GADErrorNoFill: code = ANAdResponseCode.UNABLE_TO_FILL; break; - case kGADErrorNetworkError: + case GADErrorNetworkError: code = ANAdResponseCode.NETWORK_ERROR; break; - case kGADErrorServerError: + case GADErrorServerError: code = ANAdResponseCode.NETWORK_ERROR; break; - case kGADErrorOSVersionTooLow: + case GADErrorOSVersionTooLow: code = ANAdResponseCode.INTERNAL_ERROR; break; - case kGADErrorTimeout: + case GADErrorTimeout: code = ANAdResponseCode.NETWORK_ERROR; break; - case kGADErrorAdAlreadyUsed: + case GADErrorAdAlreadyUsed: code = ANAdResponseCode.INTERNAL_ERROR; break; - case kGADErrorMediationDataError: + case GADErrorMediationDataError: code = ANAdResponseCode.INVALID_REQUEST; break; - case kGADErrorMediationAdapterError: + case GADErrorMediationAdapterError: code = ANAdResponseCode.INTERNAL_ERROR; break; - case kGADErrorMediationInvalidAdSize: + case GADErrorMediationInvalidAdSize: code = ANAdResponseCode.INVALID_REQUEST; break; - case kGADErrorInternalError: + case GADErrorInternalError: code = ANAdResponseCode.INTERNAL_ERROR; break; - case kGADErrorInvalidArgument: + case GADErrorInvalidArgument: + code = ANAdResponseCode.INTERNAL_ERROR; + break; + case GADErrorReceivedInvalidResponse: + code = ANAdResponseCode.INTERNAL_ERROR; + break; + case GADErrorMediationNoFill: + code = ANAdResponseCode.INTERNAL_ERROR; + break; + case GADErrorApplicationIdentifierMissing: code = ANAdResponseCode.INVALID_REQUEST; break; default: diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.h b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.h index 1b39ebd6e..b4eb598c3 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.h +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.h @@ -21,6 +21,6 @@ #endif #import -@interface ANAdAdapterInterstitialAdMob : NSObject +@interface ANAdAdapterInterstitialAdMob : NSObject @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m index ad16bf274..a655e2181 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialAdMob.m @@ -18,7 +18,8 @@ @interface ANAdAdapterInterstitialAdMob () -@property (nonatomic, readwrite, strong) GADInterstitial *interstitialAd; +//@property (nonatomic, readwrite, strong) GADInterstitial *interstitialAd; +@property(nonatomic, strong) GADInterstitialAd *interstitialAd; @end @@ -32,108 +33,59 @@ - (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString targetingParameters:(nullable ANTargetingParameters *)targetingParameters { ANLogDebug(@"Requesting AdMob interstitial"); - self.interstitialAd = [[GADInterstitial alloc] initWithAdUnitID:idString]; - self.interstitialAd.delegate = self; - [self.interstitialAd loadRequest: - [self createRequestFromTargetingParameters:targetingParameters]]; + GADRequest *request = [GADRequest request]; + [GADInterstitialAd loadWithAdUnitID:idString + request:request + completionHandler:^(GADInterstitialAd *ad, NSError *error) { + if (error) { + ANLogError(@"Failed to load interstitial ad with error: %@", [error localizedDescription]); + [self.delegate didFailToLoadAd:[ANAdAdapterBaseDFP responseCodeFromRequestError:error]]; + return; + } + ANLogDebug(@"AdMob interstitial did load"); + [self.delegate didLoadInterstitialAd:self]; + self.interstitialAd = ad; + self.interstitialAd.fullScreenContentDelegate = self; + }]; + [self createRequestFromTargetingParameters:targetingParameters]; } - (void)presentFromViewController:(UIViewController *)viewController { - if (!self.interstitialAd.isReady || self.interstitialAd.hasBeenUsed) { + if (self.interstitialAd && [self.interstitialAd + canPresentFromRootViewController:viewController + error:nil]) { + ANLogDebug(@"Showing AdMob interstitial"); + [self.interstitialAd presentFromRootViewController:viewController]; + } else { ANLogDebug(@"AdMob interstitial was unavailable"); [self.delegate failedToDisplayAd]; return; } - - ANLogDebug(@"Showing AdMob interstitial"); - [self.interstitialAd presentFromRootViewController:viewController]; -} - -- (BOOL)isReady { - return self.interstitialAd.isReady; } - (GADRequest *)createRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters { return [ANAdAdapterBaseDFP googleAdRequestFromTargetingParameters:targetingParameters]; } -#pragma mark GADInterstitialDelegate +#pragma mark GADFullScreenContentDelegate -- (void)interstitialDidReceiveAd:(GADInterstitial *)ad -{ - ANLogDebug(@"AdMob interstitial did load"); - [self.delegate didLoadInterstitialAd:self]; -} - -- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error -{ - ANLogDebug(@"AdMob interstitial failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case kGADErrorInvalidRequest: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case kGADErrorNetworkError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorServerError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorOSVersionTooLow: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorAdAlreadyUsed: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationDataError: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorMediationAdapterError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationInvalidAdSize: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorInternalError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorInvalidArgument: - code = ANAdResponseCode.INVALID_REQUEST; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } - - [self.delegate didFailToLoadAd:code]; +- (void)ad:(nonnull id)ad didFailToPresentFullScreenContentWithError:(nonnull NSError *)error { + [self.delegate failedToDisplayAd]; } -- (void)interstitialWillPresentScreen:(GADInterstitial *)ad { +- (void)adDidPresentFullScreenContent:(nonnull id)ad { [self.delegate willPresentAd]; } -- (void)interstitialDidFailToPresentScreen:(nonnull GADInterstitial *)ad{ - [self.delegate failedToDisplayAd]; -} - -- (void)interstitialWillDismissScreen:(GADInterstitial *)ad { +- (void)adDidDismissFullScreenContent:(nonnull id)ad { [self.delegate willCloseAd]; -} - -- (void)interstitialDidDismissScreen:(GADInterstitial *)ad { + ANLogDebug(@"AdMob interstitial did close"); [self.delegate didCloseAd]; } -- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad { - [self.delegate willLeaveApplication]; +- (void)adDidRecordImpression:(nonnull id)ad{ + ANLogDebug(@"AdMob interstitial impression recorded"); } @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.h b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.h index ef08a92ff..0120b377e 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.h +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.h @@ -21,6 +21,6 @@ #endif #import -@interface ANAdAdapterInterstitialDFP : NSObject +@interface ANAdAdapterInterstitialDFP : NSObject @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m index 752f818cf..f11a28b67 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterInterstitialDFP.m @@ -18,7 +18,7 @@ @interface ANAdAdapterInterstitialDFP () -@property (nonatomic, readwrite, strong) DFPInterstitial *interstitialAd; +@property (nonatomic, readwrite, strong) GAMInterstitialAd *interstitialAd; @end @@ -31,105 +31,59 @@ - (void)requestInterstitialAdWithParameter:(nullable NSString *)parameterString adUnitId:(nullable NSString *)idString targetingParameters:(nullable ANTargetingParameters *)targetingParameters { - ANLogDebug(@"Requesting DFP interstitial"); - self.interstitialAd = [[DFPInterstitial alloc] initWithAdUnitID:idString]; - self.interstitialAd.delegate = self; - [self.interstitialAd loadRequest: - [self createRequestFromTargetingParameters:targetingParameters]]; + ANLogDebug(@"Requesting DFP interstitial"); + [GAMInterstitialAd loadWithAdManagerAdUnitID:idString + request:nil completionHandler:^(GAMInterstitialAd * _Nullable interstitialAd, NSError * _Nullable error) { + if (error) { + ANLogDebug(@"DFP interstitial failed to load with error: %@", error); + [self.delegate didFailToLoadAd:[ANAdAdapterBaseDFP responseCodeFromRequestError:error]]; + return; + } + ANLogDebug(@"AdMob interstitial did load"); + [self.delegate didLoadInterstitialAd:self]; + self.interstitialAd = interstitialAd; + self.interstitialAd.fullScreenContentDelegate = self; + }]; + [self createRequestFromTargetingParameters:targetingParameters]; } - (void)presentFromViewController:(UIViewController *)viewController { - if (!self.interstitialAd.isReady || self.interstitialAd.hasBeenUsed) { + if (self.interstitialAd && [self.interstitialAd + canPresentFromRootViewController:viewController + error:nil]) { + ANLogDebug(@"Showing DFP interstitial"); + [self.interstitialAd presentFromRootViewController:viewController]; + } else { ANLogDebug(@"DFP interstitial was unavailable"); [self.delegate failedToDisplayAd]; return; } - - ANLogDebug(@"Showing DFP interstitial"); - [self.interstitialAd presentFromRootViewController:viewController]; -} - -- (BOOL)isReady { - return self.interstitialAd.isReady; } - (GADRequest *)createRequestFromTargetingParameters:(ANTargetingParameters *)targetingParameters { return [ANAdAdapterBaseDFP googleAdRequestFromTargetingParameters:targetingParameters]; } -#pragma mark GADInterstitialDelegate -- (void)interstitialDidReceiveAd:(DFPInterstitial *)ad -{ - ANLogDebug(@"DFP interstitial did load"); - [self.delegate didLoadInterstitialAd:self]; -} +#pragma mark GADFullScreenContentDelegate -- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error -{ - ANLogDebug(@"DFP interstitial failed to load with error: %@", error); - ANAdResponseCode *code = ANAdResponseCode.INTERNAL_ERROR; - - switch (error.code) { - case kGADErrorInvalidRequest: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorNoFill: - code = ANAdResponseCode.UNABLE_TO_FILL; - break; - case kGADErrorNetworkError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorServerError: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorOSVersionTooLow: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorTimeout: - code = ANAdResponseCode.NETWORK_ERROR; - break; - case kGADErrorAdAlreadyUsed: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationDataError: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorMediationAdapterError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorMediationInvalidAdSize: - code = ANAdResponseCode.INVALID_REQUEST; - break; - case kGADErrorInternalError: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - case kGADErrorInvalidArgument: - code = ANAdResponseCode.INVALID_REQUEST; - break; - default: - code = ANAdResponseCode.INTERNAL_ERROR; - break; - } - - [self.delegate didFailToLoadAd:code]; +- (void)ad:(nonnull id)ad didFailToPresentFullScreenContentWithError:(nonnull NSError *)error { + [self.delegate failedToDisplayAd]; } -- (void)interstitialWillPresentScreen:(DFPInterstitial *)ad { +- (void)adDidPresentFullScreenContent:(nonnull id)ad { [self.delegate willPresentAd]; } -- (void)interstitialWillDismissScreen:(DFPInterstitial *)ad { +- (void)adDidDismissFullScreenContent:(nonnull id)ad { [self.delegate willCloseAd]; -} - -- (void)interstitialDidDismissScreen:(DFPInterstitial *)ad { + ANLogDebug(@"AdMob interstitial did close"); [self.delegate didCloseAd]; } -- (void)interstitialWillLeaveApplication:(DFPInterstitial *)ad { - [self.delegate willLeaveApplication]; +- (void)adDidRecordImpression:(nonnull id)ad{ + ANLogDebug(@"AdMob interstitial impression recorded"); } @end diff --git a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.m b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.m index ca7011c2d..f14b28a6a 100644 --- a/mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.m +++ b/mediation/mediatedviews/GoogleAdMob/ANAdAdapterNativeAdMob.m @@ -22,11 +22,11 @@ #import "ANProxyViewController.h" #endif -@interface ANAdAdapterNativeAdMob () +@interface ANAdAdapterNativeAdMob () @property (nonatomic) GADAdLoader *nativeAdLoader; @property (nonatomic) ANProxyViewController *proxyViewController; -@property (nonatomic) GADUnifiedNativeAd *nativeAd; +@property (nonatomic) GADNativeAd *nativeAd; @end @@ -54,7 +54,7 @@ - (void)requestNativeAdWithServerParameter:(nullable NSString *)parameterString ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); self.nativeAdLoader = [[GADAdLoader alloc] initWithAdUnitID:adUnitId rootViewController:(UIViewController *)self.proxyViewController - adTypes:@[kGADAdLoaderAdTypeUnifiedNative] + adTypes:@[kGADAdLoaderAdTypeNative] options:@[]]; self.nativeAdLoader.delegate = self; [self.nativeAdLoader loadRequest:[ANAdAdapterBaseDFP googleAdRequestFromTargetingParameters:targetingParameters]]; @@ -67,11 +67,11 @@ - (void)registerViewForImpressionTrackingAndClickHandling:(nonnull UIView *)view self.proxyViewController.rootViewController = rvc; self.proxyViewController.adView = view; if (self.nativeAd) { - if ([view isKindOfClass:[GADUnifiedNativeAdView class]]) { - GADUnifiedNativeAdView *nativeContentAdView = (GADUnifiedNativeAdView *)view; + if ([view isKindOfClass:[GADNativeAdView class]]) { + GADNativeAdView *nativeContentAdView = (GADNativeAdView *)view; [nativeContentAdView setNativeAd:self.nativeAd]; } else { - ANLogError(@"Could not register native ad view––expected a view which is a subclass of GADUnifiedNativeAdView"); + ANLogError(@"Could not register native ad view––expected a view which is a subclass of GADNativeAdView"); } return; } @@ -79,16 +79,15 @@ - (void)registerViewForImpressionTrackingAndClickHandling:(nonnull UIView *)view #pragma mark - GADAdLoaderDelegate -- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error { +- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(NSError *)error { ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); ANLogError(@"Error loading Google native ad: %@", error); - ANAdResponseCode *code = [ANAdAdapterBaseDFP responseCodeFromRequestError:error]; - [self.requestDelegate didFailToLoadNativeAd:code]; + [self.requestDelegate didFailToLoadNativeAd:[ANAdAdapterBaseDFP responseCodeFromRequestError:error]]; } #pragma mark - GADNativeAppInstallAdLoaderDelegate -- (void)adLoader:(GADAdLoader *)adLoader didReceiveUnifiedNativeAd:(GADUnifiedNativeAd *)nativeAd +- (void)adLoader:(GADAdLoader *)adLoader didReceiveNativeAd:(GADNativeAd *)nativeAd { ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); self.nativeAd = nativeAd; diff --git a/sdk/AppNexusNativeSDK/SDK-Info.plist b/sdk/AppNexusNativeSDK/SDK-Info.plist index 7f5488338..3ea230113 100644 --- a/sdk/AppNexusNativeSDK/SDK-Info.plist +++ b/sdk/AppNexusNativeSDK/SDK-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 7.10 + 7.11 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/sdk/AppNexusSDK.xcodeproj/project.pbxproj b/sdk/AppNexusSDK.xcodeproj/project.pbxproj index a85cfb926..12a922885 100644 --- a/sdk/AppNexusSDK.xcodeproj/project.pbxproj +++ b/sdk/AppNexusSDK.xcodeproj/project.pbxproj @@ -148,6 +148,10 @@ 609733061E42EAFF0061EC0A /* ANInstreamVideoAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 609732FC1E42EAFF0061EC0A /* ANInstreamVideoAd.m */; }; 609733071E42EAFF0061EC0A /* ANVideoAdPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 609732FD1E42EAFF0061EC0A /* ANVideoAdPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 609733091E42EAFF0061EC0A /* ANVideoAdPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 609732FE1E42EAFF0061EC0A /* ANVideoAdPlayer.m */; }; + 60C4CB0225DD76B400A744CC /* ANRealTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 60C4CB0025DD76B300A744CC /* ANRealTimer.h */; }; + 60C4CB0325DD76B500A744CC /* ANRealTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 60C4CB0025DD76B300A744CC /* ANRealTimer.h */; }; + 60C4CB0425DD76B500A744CC /* ANRealTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 60C4CB0125DD76B300A744CC /* ANRealTimer.m */; }; + 60C4CB0525DD76B500A744CC /* ANRealTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 60C4CB0125DD76B300A744CC /* ANRealTimer.m */; }; 60D39E1522570FE20029F741 /* ANVideoPlayerSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 60D39E1322570FE20029F741 /* ANVideoPlayerSettings.h */; settings = {ATTRIBUTES = (Public, ); }; }; 60D39E1722570FE20029F741 /* ANVideoPlayerSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 60D39E1422570FE20029F741 /* ANVideoPlayerSettings.m */; }; 60D39E2922679E480029F741 /* ANVideoPlayerSettings+ANCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 60D39E26226798D50029F741 /* ANVideoPlayerSettings+ANCategory.h */; }; @@ -449,6 +453,8 @@ 609732FE1E42EAFF0061EC0A /* ANVideoAdPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANVideoAdPlayer.m; sourceTree = ""; }; 609733001E42EAFF0061EC0A /* ASTMediationManager.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ASTMediationManager.js; sourceTree = ""; }; 60AB32891E521FE500429ED7 /* MobileVastPlayer.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = MobileVastPlayer.js; sourceTree = ""; }; + 60C4CB0025DD76B300A744CC /* ANRealTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANRealTimer.h; sourceTree = ""; }; + 60C4CB0125DD76B300A744CC /* ANRealTimer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANRealTimer.m; sourceTree = ""; }; 60D39E0F2256EE420029F741 /* optionsparser.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = optionsparser.js; sourceTree = ""; }; 60D39E1322570FE20029F741 /* ANVideoPlayerSettings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANVideoPlayerSettings.h; sourceTree = ""; }; 60D39E1422570FE20029F741 /* ANVideoPlayerSettings.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANVideoPlayerSettings.m; sourceTree = ""; }; @@ -902,6 +908,8 @@ 60D39E1422570FE20029F741 /* ANVideoPlayerSettings.m */, 60183FD222933E9500CFDE33 /* ANWebView.h */, 60183FD322933E9500CFDE33 /* ANWebView.m */, + 60C4CB0025DD76B300A744CC /* ANRealTimer.h */, + 60C4CB0125DD76B300A744CC /* ANRealTimer.m */, 00C491C025DF15AB00609E49 /* ANExternalUserId.m */, ); path = internal; @@ -1076,6 +1084,7 @@ 8AC65F691A40DE74006BCF39 /* ANMRAIDOrientationProperties.h in Headers */, 8AC65F6B1A40DE74006BCF39 /* ANMRAIDResizeProperties.h in Headers */, 8AC65F6D1A40DE74006BCF39 /* ANMRAIDResizeView.h in Headers */, + 60C4CB0225DD76B400A744CC /* ANRealTimer.h in Headers */, 8AC65F6F1A40DE74006BCF39 /* ANMRAIDResizeViewManager.h in Headers */, 8AC65F711A40DE74006BCF39 /* ANMRAIDUtil.h in Headers */, 4F8EBCD4235E2F6200256BFB /* ANMultiAdRequest+PrivateMethods.h in Headers */, @@ -1187,6 +1196,7 @@ 0ECF336322D79A62007DB185 /* AppNexusNativeSDK.h in Headers */, F52F82EB2293362600F4578C /* NSObject+ANCategory.h in Headers */, F52F82EE2293367A00F4578C /* NSString+ANCategory.h in Headers */, + 60C4CB0325DD76B500A744CC /* ANRealTimer.h in Headers */, 0099B485228CA18C004E80AB /* NSTimer+ANCategory.h in Headers */, 00C4919425DF043100609E49 /* ANExternalUserId.h in Headers */, 0099B483228CA0EB004E80AB /* UIView+ANCategory.h in Headers */, @@ -1419,6 +1429,7 @@ 97EC51EF2229782B00B740DF /* ANVerificationScriptResource.m in Sources */, 609733091E42EAFF0061EC0A /* ANVideoAdPlayer.m in Sources */, 609732D91E42E9860061EC0A /* ANVideoAdProcessor.m in Sources */, + 60C4CB0425DD76B500A744CC /* ANRealTimer.m in Sources */, 60D39E1722570FE20029F741 /* ANVideoPlayerSettings.m in Sources */, 60183FD622934AB500CFDE33 /* ANWebView.m in Sources */, 609732B21E42E73D0061EC0A /* NSDictionary+ANCategory.m in Sources */, @@ -1466,6 +1477,7 @@ F5731B87228C951D0012B134 /* ANOMIDImplementation.m in Sources */, F5731B84228C94EE0012B134 /* ANOpenInExternalBrowserActivity.m in Sources */, F52F82F1229338F100F4578C /* ANProxyViewController.m in Sources */, + 60C4CB0525DD76B500A744CC /* ANRealTimer.m in Sources */, F5731B7C228C948C0012B134 /* ANReachability.m in Sources */, F5731B64228C8E190012B134 /* ANRTBVideoAd.m in Sources */, F5731B6E228C8E4A0012B134 /* ANSDKSettings.m in Sources */, diff --git a/sdk/AppNexusSDK/SDK-Info.plist b/sdk/AppNexusSDK/SDK-Info.plist index 1dfe1b686..de26bccf7 100644 --- a/sdk/AppNexusSDK/SDK-Info.plist +++ b/sdk/AppNexusSDK/SDK-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 7.10 + 7.11 CFBundleSignature ???? CFBundleVersion diff --git a/sdk/sourcefiles/ANCustomAdapter.h b/sdk/sourcefiles/ANCustomAdapter.h index e9b98743c..10608ebd9 100644 --- a/sdk/sourcefiles/ANCustomAdapter.h +++ b/sdk/sourcefiles/ANCustomAdapter.h @@ -65,6 +65,8 @@ adUnitId:(nullable NSString *)idString targetingParameters:(nullable ANTargetingParameters *)targetingParameters; - (void)presentFromViewController:(nullable UIViewController *)viewController; + +@optional - (BOOL)isReady; @property (nonatomic, readwrite, weak, nullable) id delegate; diff --git a/sdk/sourcefiles/ANSDKSettings.h b/sdk/sourcefiles/ANSDKSettings.h index 45f18848d..29006e153 100644 --- a/sdk/sourcefiles/ANSDKSettings.h +++ b/sdk/sourcefiles/ANSDKSettings.h @@ -97,6 +97,19 @@ An AppNexus disableIDFAUsage is a boolean value which exclude the IDFA field in */ @property (nonatomic, readwrite) BOOL disableIDFAUsage; +/** + Specify if impression should be counted when the creative is loaded & viewable on screen. + This feature is disabled by default. + */ +@property (nonatomic, readwrite, assign) BOOL countImpressionOn1PxRendering; + + +/** + Do not track flag. Set this to YES if you have information in the app about user opt out and want to disable tracking cookies for this auction. + Default value is set to NO. +*/ +@property (nonatomic, readwrite) BOOL doNotTrack; + /** Specifies a string that corresponds to the Publishers User ID for current application user. diff --git a/sdk/sourcefiles/Categories/UIView+ANCategory.h b/sdk/sourcefiles/Categories/UIView+ANCategory.h index d1959b345..c340a6529 100644 --- a/sdk/sourcefiles/Categories/UIView+ANCategory.h +++ b/sdk/sourcefiles/Categories/UIView+ANCategory.h @@ -29,6 +29,7 @@ - (BOOL)an_isAtLeastHalfViewable; - (CGFloat)an_exposedPercentage; - (CGRect)an_visibleRectangle; +- (CGRect)an_visibleInViewRectangle; - (UIViewController *)an_parentViewController; diff --git a/sdk/sourcefiles/Categories/UIView+ANCategory.m b/sdk/sourcefiles/Categories/UIView+ANCategory.m index e8d40519e..03829aa40 100644 --- a/sdk/sourcefiles/Categories/UIView+ANCategory.m +++ b/sdk/sourcefiles/Categories/UIView+ANCategory.m @@ -141,6 +141,23 @@ - (CGFloat)an_exposedPercentage{ return exposedPrecentage; } +//Provide a visible rectangle in more of the position within the view along with the width & height.eg (81.0,430.0,300.0,250.0) +- (CGRect)an_visibleInViewRectangle{ + CGRect visibleRectangle = CGRectMake(0,0,0,0); + if(self.an_isViewable){ + + UIWindow *parentWindow = self.window; + + // We need to call convertRect:toView: on this view's superview rather than on this view itself. + CGRect viewFrameInWindowCoordinates = [self.superview convertRect:self.frame toView:parentWindow]; + visibleRectangle = CGRectIntersection(viewFrameInWindowCoordinates, parentWindow.frame); + + } + + return visibleRectangle; + +} + - (CGRect)an_visibleRectangle{ CGRect visibleRectangle = CGRectMake(0,0,0,0); if(self.an_isViewable){ diff --git a/sdk/sourcefiles/internal/ANAdFetcherBase.m b/sdk/sourcefiles/internal/ANAdFetcherBase.m index 6640aa329..6768a132f 100644 --- a/sdk/sourcefiles/internal/ANAdFetcherBase.m +++ b/sdk/sourcefiles/internal/ANAdFetcherBase.m @@ -80,7 +80,7 @@ - (nonnull instancetype)initWithMultiAdRequestManager: (nonnull ANMultiAdRequest - (void)cookieSync:(NSHTTPURLResponse *)response { - if([ANGDPRSettings canAccessDeviceData]){ + if([ANGDPRSettings canAccessDeviceData] && !ANSDKSettings.sharedInstance.doNotTrack){ NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[response allHeaderFields] forURL:[response URL]]; [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:cookies forURL:[response URL] mainDocumentURL:nil]; } @@ -126,7 +126,7 @@ - (void)requestAd } - if([ANGDPRSettings canAccessDeviceData]){ + if([ANGDPRSettings canAccessDeviceData] && !ANSDKSettings.sharedInstance.doNotTrack){ NSString *urlString = [[[ANSDKSettings sharedInstance] baseUrlConfig] webViewBaseUrl]; NSURL *URL = [NSURL URLWithString:urlString]; NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:URL]; diff --git a/sdk/sourcefiles/internal/ANAdViewInternalDelegate.h b/sdk/sourcefiles/internal/ANAdViewInternalDelegate.h index 0273b6635..4927aa120 100644 --- a/sdk/sourcefiles/internal/ANAdViewInternalDelegate.h +++ b/sdk/sourcefiles/internal/ANAdViewInternalDelegate.h @@ -19,7 +19,12 @@ #import "ANAdProtocol.h" #import "ANAdFetcherResponse.h" - +typedef NS_ENUM(NSUInteger, ANImpressionFiring) { + ANAdReceived, + AN1PxViewed, + ANLazyLoad, + ANAdRendered +}; // NB Native does not use ANAdViewInternalDelegate, but instead has its own specific delegates for the // request and response halves of Native entry point. @@ -38,7 +43,7 @@ - (BOOL)valueOfEnableLazyLoad; - (BOOL)valueOfIsLazySecondPassThroughAdUnit; -- (BOOL) valueOfCountImpressionOnAdReceived; +- (ANImpressionFiring) valueOfHowImpressionBeFired; @required - (void)adRequestFailedWithError:(NSError *)error andAdResponseInfo:(ANAdResponseInfo *)adResponseInfo; diff --git a/sdk/sourcefiles/internal/ANBannerAdView.m b/sdk/sourcefiles/internal/ANBannerAdView.m index dd6d1941a..cc7df519e 100644 --- a/sdk/sourcefiles/internal/ANBannerAdView.m +++ b/sdk/sourcefiles/internal/ANBannerAdView.m @@ -16,11 +16,11 @@ #import "ANBannerAdView.h" #import "ANAdView+PrivateMethods.h" #import "ANMRAIDContainerView.h" - +#import "ANSDKSettings.h" #import "ANUniversalAdFetcher.h" #import "ANLogging.h" #import "ANTrackerManager.h" - +#import "ANRealTimer.h" #import "UIView+ANCategory.h" #import "ANBannerAdView+ANContentViewTransitions.h" #import "ANAdView+PrivateMethods.h" @@ -55,7 +55,7 @@ #pragma mark - -@interface ANBannerAdView() +@interface ANBannerAdView() @property (nonatomic, readwrite, strong) UIView *contentView; @@ -148,6 +148,7 @@ - (void)initialize { // [[ANOMIDImplementation sharedInstance] activateOMIDandCreatePartner]; + } - (void)awakeFromNib { @@ -382,7 +383,7 @@ - (void)fireTrackerAndOMID { if(self.impressionURLs != nil) { //this check is needed to know if the impression was fired early or when attached to window. if impressionURL is nil then either it was fired early & removed or there was no urls in the response - ANLogDebug(@"Impression URL fired when adview is attaching to window"); + ANLogDebug(@"Impression tracker fired"); [ANTrackerManager fireTrackerURLArray:self.impressionURLs withBlock:nil]; self.impressionURLs = nil; } @@ -536,8 +537,6 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR id adObject = response.adObject; id adObjectHandler = response.adObjectHandler; - BOOL trackersShouldBeFired = NO; - NSError *error = nil; @@ -563,8 +562,24 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR return; } - - + + //Check if its banner only & not native or native renderer + if(self.valueOfHowImpressionBeFired == AN1PxViewed){ + BOOL shouldAddDelegate = TRUE; + + if([adObjectHandler isKindOfClass:[ANNativeStandardAdResponse class]] || [adObject isKindOfClass:[ANNativeAdResponse class]]){ + shouldAddDelegate = FALSE; + } + + if(response.isLazy == NO && self.isLazySecondPassThroughAdUnit == YES){ + shouldAddDelegate = TRUE; + } + + if(shouldAddDelegate){ + [ANRealTimer addDelegate:self]; + } + } + // Capture state for all AdUnits. UNLESS this is the second pass of lazy AdUnit. // if ( (!response.isLazy && !self.isLazySecondPassThroughAdUnit) || response.isLazy ) @@ -594,6 +609,8 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR // if ([adObject isKindOfClass:[UIView class]] || response.isLazy) { + self.impressionURLs = (NSArray *) [ANGlobal valueOfGetterProperty:kANImpressionUrls forObject:adObjectHandler]; + if ( (!response.isLazy && !self.isLazySecondPassThroughAdUnit) || response.isLazy ) { NSString *width = (NSString *) [ANGlobal valueOfGetterProperty:kANBannerWidth forObject:adObjectHandler]; @@ -610,14 +627,16 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR if (_adResponseInfo.adType == ANAdTypeBanner && !([adObjectHandler isKindOfClass:[ANNativeStandardAdResponse class]])) { - self.impressionURLs = (NSArray *) [ANGlobal valueOfGetterProperty:kANImpressionUrls forObject:adObjectHandler]; + // Fire trackers and OMID upon attaching to UIView hierarchy or if countImpressionOnAdReceived is enabled, // but only when the AdUnit is not lazy. // - if (!response.isLazy && (self.window || self.countImpressionOnAdReceived)) { - trackersShouldBeFired = YES; + if(!response.isLazy && self.valueOfHowImpressionBeFired == ANAdRendered && self.window){ + //fire impression tracker + [self fireTrackerAndOMID]; } + } } @@ -634,14 +653,16 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR [self lazyAdDidReceiveAd:self]; return; - } else { - trackersShouldBeFired = YES; } // Handle AdUnit that is NOT lazy loaded. // self.contentView = adObject; + + if(self.isLazySecondPassThroughAdUnit && self.valueOfHowImpressionBeFired == ANLazyLoad){ + [self fireTrackerAndOMID]; + } if ((_adResponseInfo.adType == ANAdTypeBanner) || (_adResponseInfo.adType == ANAdTypeVideo)) { @@ -669,9 +690,6 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR } } - if (trackersShouldBeFired) { - [self fireTrackerAndOMID]; - } [self adDidReceiveAd:self]; @@ -816,21 +834,46 @@ - (BOOL)valueOfIsLazySecondPassThroughAdUnit return self.isLazySecondPassThroughAdUnit; } -- (BOOL) valueOfCountImpressionOnAdReceived { - return self.countImpressionOnAdReceived; +- (ANImpressionFiring) valueOfHowImpressionBeFired { + if (self.countImpressionOnAdReceived){ + return ANAdReceived; + } else if (ANSDKSettings.sharedInstance.countImpressionOn1PxRendering){ + return AN1PxViewed; + } else if (self.enableLazyLoad) { + return ANLazyLoad; + } + return ANAdRendered; } - #pragma mark - UIView observer methods. - (void)didMoveToWindow { if (self.contentView && (_adResponseInfo.adType == ANAdTypeBanner)) { - [self fireTrackerAndOMID]; + if(self.valueOfHowImpressionBeFired == ANAdRendered){ + ANLogDebug(@"Impression tracker fired on render"); + [self fireTrackerAndOMID]; + } } } +#pragma mark - Check if on screen & fire impression trackers + +- (void) handle1SecTimerSentNotification { + CGRect updatedVisibleInViewRectangle = [self.contentView an_visibleInViewRectangle]; + + ANLogInfo(@"exposed rectangle: %@", NSStringFromCGRect(updatedVisibleInViewRectangle)); + + if(updatedVisibleInViewRectangle.size.width > 0 && updatedVisibleInViewRectangle.size.height > 0){ + ANLogDebug(@"Impression tracker fired on 1px rendering"); + //Fire impression tracker here + [self fireTrackerAndOMID]; + //Firing the impression tracker & set the delegate to nil to not duplicate the firing of impressions + [ANRealTimer removeDelegate:self]; + } +} + @end diff --git a/sdk/sourcefiles/internal/ANGlobal.h b/sdk/sourcefiles/internal/ANGlobal.h index 2391f8079..18d29a9f2 100644 --- a/sdk/sourcefiles/internal/ANGlobal.h +++ b/sdk/sourcefiles/internal/ANGlobal.h @@ -26,7 +26,7 @@ #define AN_ERROR_TABLE @"errors" #define AN_DEFAULT_PLACEMENT_ID @"default_placement_id" -#define AN_SDK_VERSION @"7.10" +#define AN_SDK_VERSION @"7.11" #define APPNEXUS_BANNER_SIZE CGSizeMake(320, 50) diff --git a/sdk/sourcefiles/internal/ANGlobal.m b/sdk/sourcefiles/internal/ANGlobal.m index 0e7a10cab..a00f9e3b9 100644 --- a/sdk/sourcefiles/internal/ANGlobal.m +++ b/sdk/sourcefiles/internal/ANGlobal.m @@ -520,7 +520,7 @@ + (ANVideoOrientation) parseVideoOrientation:(NSString *)aspectRatio { } + (void) setWebViewCookie:(nonnull WKWebView*)webView{ - if([ANGDPRSettings canAccessDeviceData]){ + if([ANGDPRSettings canAccessDeviceData] && !ANSDKSettings.sharedInstance.doNotTrack){ for (NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { // Skip cookies that will break our script diff --git a/sdk/sourcefiles/internal/ANRealTimer.h b/sdk/sourcefiles/internal/ANRealTimer.h new file mode 100644 index 000000000..22b53c2dd --- /dev/null +++ b/sdk/sourcefiles/internal/ANRealTimer.h @@ -0,0 +1,33 @@ +/* Copyright 2021 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@protocol ANRealTimerDelegate + +- (void)handle1SecTimerSentNotification; + +@end + +@interface ANRealTimer : NSObject + ++ (BOOL)addDelegate:(nonnull id)delegate; + ++ (BOOL)removeDelegate:(nonnull id)delegate; + +@end + + + diff --git a/sdk/sourcefiles/internal/ANRealTimer.m b/sdk/sourcefiles/internal/ANRealTimer.m new file mode 100644 index 000000000..dcec9fe83 --- /dev/null +++ b/sdk/sourcefiles/internal/ANRealTimer.m @@ -0,0 +1,120 @@ +/* Copyright 2021 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANRealTimer.h" +#import "NSTimer+ANCategory.h" +#import "ANGlobal.h" +#import "ANLogging.h" + + +@interface ANRealTimer() + +@property (nonatomic, readwrite, strong) NSTimer *viewabilityTimer; +@property (nonatomic, readwrite, strong) NSMutableArray> *timerDelegates; + + +@end + +@implementation ANRealTimer + ++ (instancetype)sharedInstance { + static ANRealTimer *manager; + static dispatch_once_t managerToken; + dispatch_once(&managerToken, ^{ + manager = [[ANRealTimer alloc] init]; + manager.timerDelegates = [[NSMutableArray alloc] init]; + }); + return manager; +} + ++ (void) scheduleTimer { + [self sharedInstance]; +} + ++ (BOOL)addDelegate:(nonnull id)delegate { + return [[self sharedInstance] addDelegate:delegate]; +} + ++ (BOOL)removeDelegate:(nonnull id)delegate { + return [[self sharedInstance] removeDelegate:delegate]; +} + +- (void) scheduleTimer { + if(_viewabilityTimer == nil){ + __weak ANRealTimer *weakSelf = self; + _viewabilityTimer = [NSTimer an_scheduledTimerWithTimeInterval:kAppNexusNativeAdIABShouldBeViewableForTrackingDuration + block:^ { + ANRealTimer *strongSelf = weakSelf; + + [strongSelf notifyListenerObjects]; + } + repeats:YES]; + + } +} + +- (BOOL)addDelegate:(nonnull id)delegate { + + if(![delegate conformsToProtocol:@protocol(ANRealTimerDelegate)]){ + ANLogError(@"FAILED to add delegate, delegate does not confront to protocol"); + return NO; + } + if([self.timerDelegates containsObject:delegate]){ + ANLogWarn(@"Delegate already added"); + return YES; + } + if(self.viewabilityTimer == nil){ + [self scheduleTimer]; + } + [self.timerDelegates addObject:delegate]; + return YES; + +} + +- (BOOL)removeDelegate:(nonnull id)delegate { + if(![delegate conformsToProtocol:@protocol(ANRealTimerDelegate)]){ + ANLogError(@"FAILED to remove delegate, delegate does not confront to protocol"); + return NO; + } + + [self.timerDelegates removeObject:delegate]; + + //if no delegates found then the timer can be stopped & added again if a new delegate is added + if(self.timerDelegates.count <= 0){ + [self.viewabilityTimer invalidate]; + self.viewabilityTimer = nil; + } + + return YES; +} + +-(void) notifyListenerObjects { + if(self.timerDelegates.count > 0) { + for (int i=0; i< self.timerDelegates.count; i++){ + id delegate = self.timerDelegates[i]; + if([delegate respondsToSelector:@selector(handle1SecTimerSentNotification)]){ + ANLogInfo(@"Notifications pushed from time\ + "); + + [delegate handle1SecTimerSentNotification]; + } + } + } + else { + ANLogError(@"no delegate subscription found"); + } +} + +@end diff --git a/sdk/sourcefiles/internal/ANUniversalAdFetcher.m b/sdk/sourcefiles/internal/ANUniversalAdFetcher.m index ec186d23c..bbac01691 100644 --- a/sdk/sourcefiles/internal/ANUniversalAdFetcher.m +++ b/sdk/sourcefiles/internal/ANUniversalAdFetcher.m @@ -338,6 +338,7 @@ - (void)handleStandardAd:(ANStandardAd *)standardAd CGSize sizeOfWebview = [self getWebViewSizeForCreativeWidth: standardAd.width andHeight: standardAd.height]; + // if ([self.delegate respondsToSelector:@selector(valueOfEnableLazyLoad)] && [self.delegate valueOfEnableLazyLoad]) { @@ -354,9 +355,6 @@ - (void)handleStandardAd:(ANStandardAd *)standardAd if (!returnValue) { ANLogError(@"FAILED to allocate self.adView."); - } else { - [self fireImpressionTrackersEarly:standardAd]; - } } @@ -423,12 +421,16 @@ -(void) renderNativeAd:(ANBaseAdObject *)nativeRenderingElement { - (void) fireImpressionTrackersEarly:(ANBaseAdObject *) ad { //fire the impression tracker earlier in the lifecycle. immediatley after creating the webView. - BOOL countImpressionOnAdReceived = [self.delegate respondsToSelector:@selector(valueOfCountImpressionOnAdReceived)] && [self.delegate valueOfCountImpressionOnAdReceived]; - if(countImpressionOnAdReceived){ - ANLogDebug(@"Impression URL fired when we have a valid ad & the view is created"); - [ANTrackerManager fireTrackerURLArray:ad.impressionUrls withBlock:nil]; - ad.impressionUrls = nil; + + if ([self.delegate respondsToSelector:@selector(valueOfHowImpressionBeFired)]){ + ANImpressionFiring howImpressionFired = [self.delegate valueOfHowImpressionBeFired]; + //fire impression when we receive the ad or if lazy load is enabled + if(howImpressionFired == ANAdReceived || howImpressionFired == ANLazyLoad){ + ANLogDebug(@"Impression tracker fired on ad received %@", ad.impressionUrls.firstObject); + [ANTrackerManager fireTrackerURLArray:ad.impressionUrls withBlock:nil]; + ad.impressionUrls = nil; + } } } @@ -572,9 +574,16 @@ - (BOOL)allocateAndSetWebviewWithSize: (CGSize)webviewSize videoXML: webviewContent ]; } else { + + ANStandardAd *standardAd = (ANStandardAd *)self.adObjectHandler; + self.adView = [[ANMRAIDContainerView alloc] initWithSize: webviewSize HTML: webviewContent webViewBaseURL: [NSURL URLWithString:[[[ANSDKSettings sharedInstance] baseUrlConfig] webViewBaseUrl]] ]; + + [self fireImpressionTrackersEarly:standardAd]; + + } if (!self.adView) @@ -607,7 +616,8 @@ - (BOOL)allocateAndSetWebviewFromCachedAdObjectHandler // [self restartAutoRefreshTimer]; [self startAutoRefreshTimer]; - + + return [self allocateAndSetWebviewWithSize: sizeOfWebview content: lazyStandardAd.content isXMLForVideo: NO ]; diff --git a/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m b/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m index dad1f939d..ffe1685db 100644 --- a/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m +++ b/sdk/sourcefiles/internal/ANUniversalTagRequestBuilder.m @@ -578,6 +578,10 @@ -(void)getAdFramework:(NSMutableDictionary *)tag{ }else if ([self.adFetcherDelegate externalUid]) { userDict[@"external_uid"] = [self.adFetcherDelegate externalUid]; } + + if ([[ANSDKSettings sharedInstance] doNotTrack]) { + userDict[@"dnt"] = [NSNumber numberWithBool:YES]; + } return [userDict copy]; } @@ -708,7 +712,7 @@ -(void)getAdFramework:(NSMutableDictionary *)tag{ - (NSDictionary *)deviceId { - if([ANGDPRSettings canAccessDeviceData] && ANAdvertisingTrackingEnabled()){ + if([ANGDPRSettings canAccessDeviceData] && ANAdvertisingTrackingEnabled() && !ANSDKSettings.sharedInstance.doNotTrack){ return [self fetchAdvertisingIdentifier]; } diff --git a/sdk/sourcefiles/internal/config/ANSDKSettings.m b/sdk/sourcefiles/internal/config/ANSDKSettings.m index 9376d429e..7e1d6281a 100644 --- a/sdk/sourcefiles/internal/config/ANSDKSettings.m +++ b/sdk/sourcefiles/internal/config/ANSDKSettings.m @@ -101,8 +101,10 @@ + (id)sharedInstance { sdkSettings.enableOpenMeasurement = YES; sdkSettings.enableTestMode = NO; sdkSettings.disableIDFAUsage = NO; + sdkSettings.doNotTrack = NO; sdkSettings.auctionTimeout = 0; sdkSettings.nativeAdAboutToExpireInterval = kAppNexusNativeAdAboutToExpireInterval; + sdkSettings.countImpressionOn1PxRendering = NO; }); return sdkSettings; } @@ -151,5 +153,4 @@ -(void)setNativeAdAboutToExpireInterval:(NSInteger)nativeAdAboutToExpireInterval __nativeAdAboutToExpireInterval = nativeAdAboutToExpireInterval; } - @end diff --git a/sdk/sourcefiles/native/internal/ANNativeAdResponse.m b/sdk/sourcefiles/native/internal/ANNativeAdResponse.m index a627b0a3e..119562475 100644 --- a/sdk/sourcefiles/native/internal/ANNativeAdResponse.m +++ b/sdk/sourcefiles/native/internal/ANNativeAdResponse.m @@ -27,6 +27,7 @@ NSInteger const kANNativeFacebookAdAboutToExpire = 3600; NSInteger const kANNativeRTBAdAboutToExpire = 21600; NSInteger const kANNativeRTBAdAboutToExpireForMember_11217 = 300; +NSInteger const kANNativeRTBAdAboutToExpireForMember_12085 = 600; #pragma mark - ANNativeAdResponseGestureRecognizerRecord @@ -333,6 +334,8 @@ -(void)registerAdAboutToExpire{ timeInterval = kANNativeFacebookAdAboutToExpire - self.aboutToExpireInterval; }else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 11217 ){ timeInterval = kANNativeRTBAdAboutToExpireForMember_11217 - self.aboutToExpireInterval; + }else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 12085 ){ + timeInterval = kANNativeRTBAdAboutToExpireForMember_12085 - self.aboutToExpireInterval; }else{ timeInterval = kANNativeRTBAdAboutToExpire - self.aboutToExpireInterval; } @@ -392,6 +395,9 @@ - (void)setAboutToExpireTimeInterval }else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 11217 && aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpireForMember_11217 ){ ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 5 minutes for RTB & member 11217"); return; + }else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 12085 && aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpireForMember_12085 ){ + ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 10 minutes for RTB & member 12085"); + return; }else if(aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpire){ ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 6 hours"); return; diff --git a/sdk/sourcefiles/native/internal/ANNativeStandardAdResponse.m b/sdk/sourcefiles/native/internal/ANNativeStandardAdResponse.m index 250a3741d..62f11c804 100644 --- a/sdk/sourcefiles/native/internal/ANNativeStandardAdResponse.m +++ b/sdk/sourcefiles/native/internal/ANNativeStandardAdResponse.m @@ -22,11 +22,12 @@ #import "UIView+ANCategory.h" #import "ANTrackerManager.h" #import "ANOMIDImplementation.h" +#import "ANSDKSettings.h" +#import "ANRealTimer.h" - -@interface ANNativeStandardAdResponse() +@interface ANNativeStandardAdResponse() @property (nonatomic, readwrite, strong) NSDate *dateCreated; @property (nonatomic, readwrite, assign) ANNativeAdNetworkCode networkCode; @@ -110,21 +111,36 @@ - (void)unregisterViewFromTracking { - (void)setupViewabilityTracker { - __weak ANNativeStandardAdResponse *weakSelf = self; - NSInteger requiredAmountOfSimultaneousViewableEvents = lround( kAppNexusNativeAdIABShouldBeViewableForTrackingDuration - / kAppNexusNativeAdCheckViewabilityForTrackingFrequency) + 1; - self.targetViewabilityValue = lround(pow(2, requiredAmountOfSimultaneousViewableEvents) - 1); - ANLogDebug(@"\n\trequiredAmountOfSimultaneousViewableEvents=%@ \n\ttargetViewabilityValue=%@", @(requiredAmountOfSimultaneousViewableEvents), @(self.targetViewabilityValue)); + if(!ANSDKSettings.sharedInstance.countImpressionOn1PxRendering) { + __weak ANNativeStandardAdResponse *weakSelf = self; + NSInteger requiredAmountOfSimultaneousViewableEvents = lround( kAppNexusNativeAdIABShouldBeViewableForTrackingDuration + / kAppNexusNativeAdCheckViewabilityForTrackingFrequency) + 1; + self.targetViewabilityValue = lround(pow(2, requiredAmountOfSimultaneousViewableEvents) - 1); + ANLogDebug(@"\n\trequiredAmountOfSimultaneousViewableEvents=%@ \n\ttargetViewabilityValue=%@", @(requiredAmountOfSimultaneousViewableEvents), @(self.targetViewabilityValue)); + + self.viewabilityTimer = [NSTimer an_scheduledTimerWithTimeInterval:kAppNexusNativeAdCheckViewabilityForTrackingFrequency + block:^ { + ANNativeStandardAdResponse *strongSelf = weakSelf; + + [strongSelf checkIfIABViewable]; + } repeats:YES]; + } else { + [ANRealTimer addDelegate:self]; + } +} + +- (void) checkIfViewIs1pxOnScreen { + CGRect updatedVisibleInViewRectangle = [self.viewForTracking an_visibleInViewRectangle]; + + ANLogInfo(@"visible rectangle Native: %@", NSStringFromCGRect(updatedVisibleInViewRectangle)); + if(updatedVisibleInViewRectangle.size.width > 0 && updatedVisibleInViewRectangle.size.height > 0){ + ANLogInfo(@"Impression tracker fired when 1px native on screen"); + [self trackImpression]; + } - self.viewabilityTimer = [NSTimer an_scheduledTimerWithTimeInterval:kAppNexusNativeAdCheckViewabilityForTrackingFrequency - block:^ { - ANNativeStandardAdResponse *strongSelf = weakSelf; - [strongSelf checkViewability]; - } - repeats:YES]; } -- (void)checkViewability { +- (void)checkIfIABViewable { self.viewabilityValue = (self.viewabilityValue << 1 | [self.viewForTracking an_isAtLeastHalfViewable]) & self.targetViewabilityValue; BOOL isIABViewable = (self.viewabilityValue == self.targetViewabilityValue); ANLogDebug(@"\n\tviewabilityValue=%@ \n\tself.targetViewabilityValue=%@ \n\tisIABViewable=%@", @(self.viewabilityValue), @(self.targetViewabilityValue), @(isIABViewable)); @@ -140,6 +156,7 @@ - (void)trackImpression { [self fireImpTrackers]; [self.viewabilityTimer invalidate]; self.impressionHasBeenTracked = YES; + [ANRealTimer removeDelegate:self]; } } @@ -156,6 +173,12 @@ - (void)fireImpTrackers { } } +- (void) handle1SecTimerSentNotification { + if(!self.impressionHasBeenTracked){ + [self checkIfViewIs1pxOnScreen]; + } +} + diff --git a/tests/TrackerUITest/HelpingLibrary/Categories/ANNativeAdResponse+PrivateMethods.h b/tests/TrackerUITest/HelpingLibrary/Categories/ANNativeAdResponse+PrivateMethods.h new file mode 100644 index 000000000..db9d948b7 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Categories/ANNativeAdResponse+PrivateMethods.h @@ -0,0 +1,26 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + +#import "ANVerificationScriptResource.h" + +@interface ANNativeAdResponse (PrivateMethods) + + +#pragma mark - Unregistration + +- (void)unregisterViewFromTracking; + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.h b/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.h new file mode 100644 index 000000000..03dd8dded --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.h @@ -0,0 +1,21 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "ANVerificationScriptResource.h" + +@interface ANVerificationScriptResource (ANTest) +- (void)anVerificationScriptResource:(NSDictionary *)jsonDic; +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.m b/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.m new file mode 100644 index 000000000..ae2a78250 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Categories/ANVerificationScriptResource+ANTest.m @@ -0,0 +1,30 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANVerificationScriptResource+ANTest.h" + +@implementation ANVerificationScriptResource (ANTest) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" +- (void)anVerificationScriptResource:(NSDictionary *)jsonDic +{ + self.url = @"https://acdn.adnxs.com/mobile/omsdk/test/omid-validation-verification-script-1.2.5.js"; + self.vendorKey = @"dummyVendor"; + self.params = @"http://dummy-domain/m?msg="; +} +#pragma clang diagnostic pop + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMBannerAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMBannerAd.json new file mode 100755 index 000000000..9ba55269b --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMBannerAd.json @@ -0,0 +1,63 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 18144580, + "auction_id": "6918394593318350869", + "nobid": false, + "no_ad_url": "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKNCKANBAAAAwDWAAUBCIffy_AFEJXg5LWj58SBYBie4p7ovf_NlngqNgkAAAkCABEJBwgAABkJCQjgPyEJCQgAACkRCQAxCQnwfeA_MMS60wg47k5A7k5IAFAAWM6zbGAAaKSThgF4AIABAYoBAJIBA1VTRJgBwAKgATKoAQawAQC4AQDAAQDIAQLQAQDYAQDgAQDwAQCKAjx1ZignYScsIDMzOTA3NTMsIDE1NzgyOTkyNzEpO3VmKCdyJywgMjAxNzIxNzU4LDIfAPD1kgK1AiFmai1KelFqTjFkMFJFSjZQbUdBWUFDRE9zMnd3QURnQVFBUkk3azVReExyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFHZlIxZjV0QWlNUDhFQm4wZFgtYlFJakRfSkFkU2J2NjdNNXZVXzJRRUFBQUFBQUFEd1AtQUJBUFVCb1VWZ1BKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRHpkWGRFYm9EQ1U1WlRUSTZOREF3T2VBRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNAZAsNEJBQ0lCYWtmcVFVAREBFDx3UHcuLpoCiQEhaUJMZkNBNjkBoHpyTnNJQVFvQURGN0ZLNUg0WHFFUHpvSlRsbE5Nam8wTURBNVFQa1lTEXgMUEFfVREMDEFBQVcdDABZHQwAYR0MAGMdDPQOAWVBQS7YAgDgAsqoTeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwL2FwcG5leHVzLXNkay1hcHAvaWQ3MzY4Njk4MzOAAwCIAwGQAwCYAxegAwGqAwDAA6wCyAMB2AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAwxMC43NS4xMC4xNDGoBIeaAbIEDggAEAEYACAAKAAwADgCuAQAwAQAyAQA0gQPMTAwOTQjTllNMjo0MDA52gQCCADgBADwBJ6PmGD6BBIJAAAAQJbkQkARAAAAwAKaXsCCBQk3MzY4Njk4MzOIBQGYBQCgBf___________wHABQDJBQAAAAAAAPA_0gUJCQAAAABhYnDYBQHgBQHwBY2XBvoFBAgAEACQBgCYBgC4BgDBBgEhMAAA8L_QBtYz2gYWChAJERkBUBAAGADgBgHyBgIIAIAHAYgHAKAHAQ..&s=ab2bb0e4df506ecdd3f1072c63113f3bf0a8bb26", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "rtb_video_fallback": false, + "ads": [ + { + "content_source": "csm", + "ad_type": "banner", + "buyer_member_id": 10094, + "creative_id": 201721758, + "media_type_id": 1, + "media_subtype_id": 1, + "brand_category_id": 53, + "client_initiated_ad_counting": false, + "viewability": { + "config": "document.write('
');" + }, + "csm": { + "banner": { + "content": "
", + "width": 320, + "height": 50 + }, + "timeout_ms": 500, + "handler": [ + { + "width": "320", + "height": "50", + "type": "ios", + "class": "ANAdAdapterBannerAdMob", + "id": "ca-app-pub-3940256099942544/2934735716" + }, + { + "width": "320", + "height": "50", + "type": "android", + "class": "com.appnexus.opensdk.mediatedviews.AdMobBanner", + "id": "ca-app-pub-3940256099942544/6300978111" + } + ], + "trackers": [ + { + "impression_urls": [ + "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKVCOgVBAAAAwDWAAUBCIffy_AFEJXg5LWj58SBYBie4p7ovf_NlngqNgkLB0KygAmMPxELB0KygAmMPxkAAAECCOA_IREbACkRCQAxARm4AADgPzDEutMIOO5OQO5OSAJQno-YYFjOs2xgAGikk4YBePrbBIABAYoBA1VTRJIFBvBVmAHAAqABMqgBBrABALgBAcABBMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMzM5MDc1MywgMTU3ODI5OTI3MSk7dWYoJ3InLCAyMDE3MjE3NTgsIDEdH_D1kgK1AiFmai1KelFqTjFkMFJFSjZQbUdBWUFDRE9zMnd3QURnQVFBUkk3azVReExyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFHZlIxZjV0QWlNUDhFQm4wZFgtYlFJakRfSkFkU2J2NjdNNXZVXzJRRUFBQUFBQUFEd1AtQUJBUFVCb1VWZ1BKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRHpkWGRFYm9EQ1U1WlRUSTZOREF3T2VBRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNAZAsNEJBQ0lCYWtmcVFVAREBFDx3UHcuLpoCiQEhaUJMZkNBNjkBoHpyTnNJQVFvQURGN0ZLNUg0WHFFUHpvSlRsbE5Nam8wTURBNVFQa1lTEXgMUEFfVREMDEFBQVcdDABZHQwAYR0MAGMdDPDCZUFBLtgCAOACyqhN6gI0aXR1bmVzLmFwcGxlLmNvbS91cy9hcHAvYXBwbmV4dXMtc2RrLWFwcC9pZDczNjg2OTgzM4ADAIgDAZADAJgDF6ADAaoDAMADrALIAwHYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIEDDEwLjc1LjEwLjE0MagEh5oBsgQOCAAQARgAIAAoADAAOAK4BADABADIBADSBA8xMDA5NCNOWU0yOjQwMDnaBAIIAeAEAfAEYQhg-gQSCQAAAECW5EJAEQAAAMACml7AggUJNxGlIIgFAZgFAKAF_xEBFAHABQDJBWlaEPA_0gUJAUAFAXDYBQHgBQHwBY2XBvoFBAgAEACQBgCYBgC4BgDBBgUiLADwP9AG1jPaBhYKEAkRGQFQEAAYAOAGAfIGAggAgAcBiAcAoAcB&s=a0968149b94b6033cda75ec96054b354c039e55a" + ], + "video_events": {} + } + ], + "request_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_req?info=LwAAAAMABQEFAQiH38vwBRCV4OS1o-fEgWAY7k4hCwdCsoAJjD8ono-YYDANOAA.&s=fa584117ee352a237773c5b4b837c831473e1af4", + "response_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_resp?info=LwAAAAMABQEFAQiH38vwBRCV4OS1o-fEgWAY7k4hCwdCsoAJjD8ono-YYDANOAA.&s=fa584117ee352a237773c5b4b837c831473e1af4" + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMInterstiatalAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMInterstiatalAd.json new file mode 100755 index 000000000..9d7a3c00f --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMInterstiatalAd.json @@ -0,0 +1,56 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 18144585, + "auction_id": "1741743309004110761", + "nobid": false, + "no_ad_url": "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKNCKANBAAAAwDWAAUBCL3fy_AFEKn36bj7yfqVGBie4p7ovf_NlngqNgkAAAkCABEJBwgAABkJCQjgPyEJCQgAACkRCQAxCQnwfeA_MMm60wg47k5A7k5IAFAAWM6zbGAAaKSThgF4AIABAYoBAJIBA1VTRJgBAaABAagBBrABALgBAMABAMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMzM5MDc1MywgMTU3ODI5OTMyNSk7dWYoJ3InLCAyMDE3MjIwNDQsIC4fAPD1kgK1AiFVRDJXandqTzFkMFJFTHlSbUdBWUFDRE9zMnd3QURnQVFBUkk3azVReWJyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFGdUNIYVh1R09RUDhFQmJnaDJsN2hqa0RfSkFVNHVJcHJQbV9rXzJRRUFBQUFBQUFEd1AtQUJBUFVCd1IyRFBKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRHp0WGRFYm9EQ1U1WlRUSTZOREk0TS1BRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNAZAsNEJBQ0lCYnNocVFVAREBFEB3UHcuLpoCiQEhclJLWkZRajI5AaB6ck5zSUFRb0FERjdGSzVINFhxRVB6b0pUbGxOTWpvME1qZ3pRUGtZUxF4DFBBX1URDAxBQUFXHQwAWR0MAGEdDABjHQz0DgFlQUEu2AIA4ALKqE3qAjRpdHVuZXMuYXBwbGUuY29tL3VzL2FwcC9hcHBuZXh1cy1zZGstYXBwL2lkNzM2ODY5ODMzgAMAiAMBkAMAmAMXoAMBqgMAwAPgqAHIAwHYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIEDDEwLjc1LjEwLjE0MagEiJoBsgQOCAAQARgAIAAoADAAOAK4BADABADIBADSBA8xMDA5NCNOWU0yOjQyODPaBAIIAOAEAPAEvJGYYPoEEgkAAABAluRCQBEAAADAAppewIIFCTczNjg2OTgzM4gFAZgFAKAF____________AcAFAMkFAAAAAAAA8D_SBQkJAAAAZWFw2AUB4AUB8AWNlwb6BQQIABAAkAYBmAYAuAYAwQYFIiwA8L_QBtYz2gYWChAJERkBUBAAGADgBgPyBgIIAIAHAYgHAKAHBQ..&s=2fc401f5b025ed9baeeeb2716cef352dcfe19596", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "rtb_video_fallback": false, + "ads": [ + { + "content_source": "csm", + "ad_type": "banner", + "buyer_member_id": 10094, + "creative_id": 201722044, + "media_type_id": 3, + "media_subtype_id": 5, + "brand_category_id": 53, + "client_initiated_ad_counting": false, + "csm": { + "banner": { + "content": "", + "width": 1, + "height": 1 + }, + "timeout_ms": 500, + "handler": [ + { + "type": "ios", + "class": "ANAdAdapterInterstitialAdMob", + "id": "ca-app-pub-3940256099942544/4411468910" + }, + { + "type": "android", + "class": "com.appnexus.opensdk.mediatedviews.AdMobInterstitial", + "id": "ca-app-pub-3940256099942544/1033173712" + } + ], + "trackers": [ + { + "impression_urls": [ + "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKVCOgVBAAAAwDWAAUBCL3fy_AFEKn36bj7yfqVGBie4p7ovf_NlngqNglpxqLp7GSQPxFpxqLp7GSQPxkAAAECCOA_IREbACkRCQAxARm4AADgPzDJutMIOO5OQO5OSAJQvJGYYFjOs2xgAGikk4YBeJGlBYABAYoBA1VTRJIFBvBVmAEBoAEBqAEGsAEAuAEBwAEEyAEC0AEA2AEA4AEA8AEAigI8dWYoJ2EnLCAzMzkwNzUzLCAxNTc4Mjk5MzI1KTt1ZigncicsIDIwMTcyMjA0NCwgMTUZH_D1kgK1AiFVRDJXandqTzFkMFJFTHlSbUdBWUFDRE9zMnd3QURnQVFBUkk3azVReWJyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFGdUNIYVh1R09RUDhFQmJnaDJsN2hqa0RfSkFVNHVJcHJQbV9rXzJRRUFBQUFBQUFEd1AtQUJBUFVCd1IyRFBKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRHp0WGRFYm9EQ1U1WlRUSTZOREk0TS1BRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNAZAsNEJBQ0lCYnNocVFVAREBFEB3UHcuLpoCiQEhclJLWkZRajI5AaB6ck5zSUFRb0FERjdGSzVINFhxRVB6b0pUbGxOTWpvME1qZ3pRUGtZUxF4DFBBX1URDAxBQUFXHQwAWR0MAGEdDABjHQz0DgFlQUEu2AIA4ALKqE3qAjRpdHVuZXMuYXBwbGUuY29tL3VzL2FwcC9hcHBuZXh1cy1zZGstYXBwL2lkNzM2ODY5ODMzgAMAiAMBkAMAmAMXoAMBqgMAwAPgqAHIAwHYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIEDDEwLjc1LjEwLjE0MagEiJoBsgQOCAAQARgAIAAoADAAOAK4BADABADIBADSBA8xMDA5NCNOWU0yOjQyODPaBAIIAOAEAfAEvJGYYPoEEgkAAABAluRCQBEAAADAAppewIIFCTczNjg2OTgzM4gFAZgFAKAF____________AcAFAMkFAAAAAAAA8D_SBQkJAAAAZWlw2AUB4AUB8AWNlwb6BQQIABAAkAYBmAYAuAYAwQYFIiwA8D_QBtYz2gYWChAJERkBUBAAGADgBgPyBgIIAIAHAYgHAKAHBQ..&s=0fc2be5f237c535c682b550d73fa8aee703ed1ca" + ], + "video_events": {} + } + ], + "request_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_req?info=LwAAAAMABQEFAQi938vwBRCp9-m4-8n6lRgY7k4hacai6exkkD8ovJGYYDAKOAA.&s=8bbf9d0cd1194953c7f824f2b5f91dc93624a7dd", + "response_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_resp?info=LwAAAAMABQEFAQi938vwBRCp9-m4-8n6lRgY7k4hacai6exkkD8ovJGYYDAKOAA.&s=8bbf9d0cd1194953c7f824f2b5f91dc93624a7dd" + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMNativeAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMNativeAd.json new file mode 100755 index 000000000..a183da222 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/CSMNativeAd.json @@ -0,0 +1,56 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 18144598, + "auction_id": "8195076460992493534", + "nobid": false, + "no_ad_url": "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKNCKANBAAAAwDWAAUBCJney_AFEN7v_aTz07DdcRie4p7ovf_NlngqNgkAAAkCABEJBwgAABkJCQjgPyEJCQgAACkRCQAxCQnwfeA_MNa60wg47k5A7k5IAFAAWM6zbGAAaKSThgF4AIABAYoBAJIBA1VTRJgBAaABAagBBrABALgBAMABAMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMzM5MDc1MywgMTU3ODI5OTE2MSk7dWYoJ3InLCAyMDE3MjI0MzUsIC4fAPD1kgK1AiFtajZNT1FqVTFkMFJFTU9VbUdBWUFDRE9zMnd3QURnQVFBUkk3azVRMXJyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFFUU9PVE5KN1NNUDhFQkVEamt6U2UwakRfSkFicVZnR0MtYlBZXzJRRUFBQUFBQUFEd1AtQUJBUFVCTjZGbFBKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRDFOWGRFYm9EQ1U1WlRUSTZOREl3T2VBRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNPEFBQUQ0QkFDSUJmRWdxUVUBEQEUQHdQdy4umgKJASF1eExrR2dqMjkBoHpyTnNJQVFvQURGN0ZLNUg0WHFFUHpvSlRsbE5Nam8wTWpBNVFQa1lTEXgMUEFfVREMDEFBQVcdDABZHQwAYR0MAGMdDPQOAWVBQS7YAgDgAsqoTeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwL2FwcG5leHVzLXNkay1hcHAvaWQ3MzY4Njk4MzOAAwCIAwGQAwCYAxegAwGqAwDAA-CoAcgDAdgD-aN64AMA6AMC-AMAgAQAkgQGL3V0L3YzmAQAogQMMTAuNzUuMTAuMTQxqASGmgGyBA4IABABGAAgACgAMAA4ArgEAMAEAMgEANIEDzEwMDk0I05ZTTI6NDIwOdoEAggA4AQA8ATDlJhg-gQSCQAAAECW5EJAEQAAAMACml7AggUJNzM2ODY5ODMziAUBmAUAoAX___________8BwAUAyQUAAAAAAADwP9IFCQkAAABlYXDYBQHgBQHwBY2XBvoFBAgAEACQBgGYBgC4BgDBBgUiLADwv9AG1jPaBhYKEAkRGQFQEAAYAOAGDPIGAggAgAcBiAcAoAdB&s=b5d32852ea3b1bbcaa5a189bdf91a73f10c9b90c", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "rtb_video_fallback": false, + "ads": [ + { + "content_source": "csm", + "ad_type": "native", + "buyer_member_id": 10094, + "creative_id": 201722435, + "media_type_id": 12, + "media_subtype_id": 65, + "brand_category_id": 53, + "client_initiated_ad_counting": true, + "viewability": { + "config": "" + }, + "csm": { + "timeout_ms": 500, + "handler": [ + { + "type": "ios", + "class": "ANAdAdapterNativeAdMob", + "param": "", + "id": "ca-app-pub-3940256099942544/3986624511" + }, + { + "type": "android", + "class": "com.appnexus.opensdk.mediatednativead.AdMobNativeAd", + "param": "", + "id": "ca-app-pub-3940256099942544/2247696110" + } + ], + "trackers": [ + { + "impression_urls": [ + "http://nym1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKVCOgVBAAAAwDWAAUBCJney_AFEN7v_aTz07DdcRie4p7ovf_NlngqNgktW-uLhLaMPxEtW-uLhLaMPxkAAAECCOA_IREbACkRCQAxARm4AADgPzDWutMIOO5OQO5OSAJQw5SYYFjOs2xgAGikk4YBeN6RBYABAYoBA1VTRJIFBvBVmAEBoAEBqAEGsAEAuAEAwAEEyAEC0AEA2AEA4AEA8AEAigI8dWYoJ2EnLCAzMzkwNzUzLCAxNTc4Mjk5MTYxKTt1ZigncicsIDIwMTcyMjQzNSwgMTUZH_D1kgK1AiFtajZNT1FqVTFkMFJFTU9VbUdBWUFDRE9zMnd3QURnQVFBUkk3azVRMXJyVENGZ0FZSVlGYUFCd0FIZ0FnQUVBaUFFQWtBRUFtQUVBb0FFQnFBRURzQUVBdVFFUU9PVE5KN1NNUDhFQkVEamt6U2UwakRfSkFicVZnR0MtYlBZXzJRRUFBQUFBQUFEd1AtQUJBUFVCTjZGbFBKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRDFOWGRFYm9EQ1U1WlRUSTZOREl3T2VBRC1SaUlCQUNRQkFDWUJBSEJCBUUJAQh5UVEJCQEBFE5nRUFQRRGNPEFBQUQ0QkFDSUJmRWdxUVUBEQEUQHdQdy4umgKJASF1eExrR2dqMjkBoHpyTnNJQVFvQURGN0ZLNUg0WHFFUHpvSlRsbE5Nam8wTWpBNVFQa1lTEXgMUEFfVREMDEFBQVcdDABZHQwAYR0MAGMdDPQOAWVBQS7YAgDgAsqoTeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwL2FwcG5leHVzLXNkay1hcHAvaWQ3MzY4Njk4MzOAAwCIAwGQAwCYAxegAwGqAwDAA-CoAcgDAdgD-aN64AMA6AMC-AMAgAQAkgQGL3V0L3YzmAQAogQMMTAuNzUuMTAuMTQxqASGmgGyBA4IABABGAAgACgAMAA4ArgEAMAEAMgEANIEDzEwMDk0I05ZTTI6NDIwOdoEAggB4AQA8ATDlJhg-gQSCQAAAECW5EJAEQAAAMACml7AggUJNzM2ODY5ODMziAUBmAUAoAX___________8BwAUAyQUAAAAAAADwP9IFCQkAAABlaXDYBQHgBQHwBY2XBvoFBAgAEACQBgGYBgC4BgDBBgUiLADwP9AG1jPaBhYKEAkRGQFQEAAYAOAGDPIGAggAgAcBiAcAoAdB&s=0570e781603fc61a0a13795369e56d18b174b362" + ], + "video_events": {} + } + ], + "request_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_req?info=LwAAAAMABQEFAQiZ3svwBRDe7_2k89Ow3XEY7k4hLVvri4S2jD8ow5SYYDBaOAA.&s=0ef93d82d284a01bfe1b6f1a2f144fa1e38ff2f0", + "response_url": "http://nym1-mobile.adnxs.com/mediation/v2/log_resp?info=LwAAAAMABQEFAQiZ3svwBRDe7_2k89Ow3XEY7k4hLVvri4S2jD8ow5SYYDBaOAA.&s=0ef93d82d284a01bfe1b6f1a2f144fa1e38ff2f0" + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerAd.json new file mode 100755 index 000000000..90bcead13 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerAd.json @@ -0,0 +1,39 @@ +{ + "version": "0.0.1", + "tags": [ + { + "tag_id": 13457285, + "auction_id": "2291993975392492012", + "nobid": false, + "no_ad_url": "http://nym1-ib.adnxs.com/it?e=wqT_3QLLBmxLAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEQASo2CQANAQARDQgEABkRCQAhEQkAKREJADERCfB7MIWvtQY4vgdAvgdIAFAAWPfiP2AAaJFAeACAAQGSAQNVU0SYAawCoAH6AagBAbABALgBAcABAMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMTEwNzYxNywgMTUyOTQ1MTEzMCk7dWYoJ3InLCAxMDIwNzA4MjksIDE1MhUf8JySAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCBQ8oSmdDQUtBQ0FMVUMFEARMMAkI8ExNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDkOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggA4AQB8ASt9NUw-gQSCUWHCEBKQEG0KMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUfMY_wHABQDJBQVCFADwP9IFCXUCYNgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=5fd01dbe8aba75c8a527ef1fa733fcb84ec8dd0c&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "ads": [ + { + "content_source": "rtb", + "ad_type": "banner", + "buyer_member_id": 958, + "creative_id": 102070829, + "media_type_id": 1, + "media_subtype_id": 1, + "client_initiated_ad_counting": true, + "rtb": { + "banner": { + "content": "
", + "width": 300, + "height": 250 + }, + "trackers": [ + { + "impression_urls": [ + "http://nym1-ib.adnxs.com/it?e=wqT_3QLWBmxWAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEwASo2CXsUrkfheoQ_EREJBBkADQEAIRESACkRCQAxDRqoADCFr7UGOL4HQL4HSAJQrfTVMFj34j9gAGiRQHjH0wSAAQGKAQNVU0SSAQEG9GgBmAGsAqAB-gGoAQGwAQC4AQHAAQTIAQLQAQDYAQDgAQDwAQCKAjx1ZignYScsIDExMDc2MTcsIDE1Mjk0NTExMzApO3VmKCdyJywgMTAyMDcwODI5LCAxNTI5NDUxMTMwKTuSAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCQUFBQUFKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDcOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggB4AQB8ARBdAz6BBIJRZJEQEpAEQAAAMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUf4Y_wHABQDJBQVCFADwP9IFCQlObAAAANgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=c60bf8485daaa47c88843086734eff52180ae5a5&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp" + ], + "video_events": {} + } + ] + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeAd.json new file mode 100755 index 000000000..7796e2827 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeAd.json @@ -0,0 +1,58 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 15740033, + "auction_id": "3579836792830527402", + "nobid": false, + "no_ad_url": "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKtCKAtBAAAAwDWAAUBCIG7rucFEKqPprSK04jXMRi1zICs5JfXxSYqNgkAAAkCABEJBywAABkAAABA4XqEPyEREgApEQkAMREb8JowgdnABzjuTkDuTkgAUABYzrNsYABopJOGAXgAgAEBigEAkgEDVVNEmAEBoAEBqAEBsAEAuAEBwAEAyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzgsIDE1NTg5NDUxNTMpO3VmKCdyJywgMTU0NDg1ODA3LCAxNRk88JqSApECIXJ6N1J3UWlIaS1FTkVLLUkxVWtZQUNET3Myd3dBRGdBUUFSSTdrNVFnZG5BQjFnQVlLVUZhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUdSN3dydzRYcUVQOEVCa2U4SzhPRjZoRF9KQVNSRzBvREZWUUJBMlFFQUFBQUFBQUR3UC1BQmlzazk5UQkULG1BSUFvQUlBdFFJQQEBAHYNCJh3QUlBeUFJQTBBSUEyQUlBNEFJQTZBSUEtQUlBZ0FNQm1BTUJxQU8F1Oh1Z01KVTBsT01Ub3pOVGMxNEFQTURJQUU4OERrQVlnRTljRGtBWkFFQUpnRUFRLi6aAmEhT0JDSDVnaQVAMRRAenJOc0lBUW9BREY3Rks1SDQB2AR6bzJcABRRTXdNU1EBqhhBQUFQQV9VEQwMQUFBVx0M9DQB2AIA4ALKqE3qAjRpdHVuZXMuYXBwbGUuY29tL3VzL2FwcC9hcHBuZXh1cy1zZGstYXBwL2lkNzM2ODY5ODMzgAMAiAMBkAMAmAMXoAMBqgMAwAOsAsgDANIDKAgAEiQ1MzYzOTYzYi02MWVhLTRiZmUtYjczMS05ZGE1MGFhNTJhYmPSAygIChIkZWY1NDA0ZTQtM2NmOS00YzNiLTkzNTAtYjRhOWE5YzA0YjU12AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAsxMC4xNC4xMi40NagEhOYisgQQCAAQARisAiD6ASgAMAA4ArgEAMAEAMgEANIEDzEwMDk0I1NJTjE6MzU3NdoEAggA4AQB8ASviNVJ-gQSCQAAAECW5EJAEQAAAMACml7AggUJNzM2CfwgiAUBmAUAoAX_EQEYAcAFAMkFAAUBFPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8L_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=6f2fa33f3b83d94aacc2346e5345dead47934579", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "ads": [ + { + "content_source": "rtb", + "ad_type": "native", + "buyer_member_id": 10094, + "creative_id": 154485807, + "media_type_id": 12, + "media_subtype_id": 65, + "brand_category_id": 0, + "client_initiated_ad_counting": true, + "viewability": { + "config": "" + }, + "rtb": { + "native": { + "title": "Native Renderer Title", + "desc": "Native Renderer Desc", + "sponsored": "Abhishek Sharma", + "ctatext": "NativeRendererCampaign", + "icon": { + "url": "https://vcdn.adnxs.com/p/creative-image/73/0d/53/85/730d5385-8952-4f74-9700-693fe2f17da0.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "main_img": { + "url": "https://vcdn.adnxs.com/p/creative-image/66/91/f0/ab/6691f0ab-d2a3-47c8-a1fb-dfdac2a80cc2.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "link": { + "url": "https://appnexus.com", + "click_trackers": [ + "https://sin1-mobile.adnxs.com/click?exSuR-F6hD97FK5H4XqEPwAAAEDheoQ_exSuR-F6hD97FK5H4XqEP6qHiaaYIq4xNSaARb5ciyaBnetcAAAAAIEs8ABuJwAAbicAAAIAAAAvRDUJzhkbAAAAAABVU0QAVVNEAAEAAQCkiQAAAAABAQQCAAAAAMIAfSJ4VQAAAAA./cpcpm=AAAAAAAAAAA=/bcr=AAAAAAAA8D8=/cnd=%21OBCH5giHi-ENEK-I1UkYzrNsIAQoADF7FK5H4XqEPzoJU0lOMTozNTc1QMwMSQAAAAAAAPA_UQAAAAAAAAAAWQAAAAAAAAAA/cca=MTAwOTQjU0lOMTozNTc1/bn=86603/" + ] + }, + "impression_trackers": [ + "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QK2CPA8NgQAAAMA1gAFAQiBu67nBRCqj6a0itOI1zEYtcyArOSX18UmKjYJexSuR-F6hD8RexSuR-F6hD8ZAAAAQAESACERGwApEQkAMREbqDCB2cAHOO5OQO5OSAJQr4jVSVjOs2xgAGikk4YBeMukBYABAYoBA1VTRJIFBvBPmAEBoAEBqAEBsAEAuAEBwAEEyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzhGHQAEcicBFBg0NDg1ODA3AQsZPPCakgKRAiFyejdSd1FpSGktRU5FSy1JMVVrWUFDRE9zMnd3QURnQVFBUkk3azVRZ2RuQUIxZ0FZS1VGYUFCd0FIZ0FnQUVBaUFFQWtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFTUkcwb0RGVlFCQTJRRUFBQUFBQUFEd1AtQUJpc2s5OVEJFCxtQUlBb0FJQXRRSUEBAQB2DQiYd0FJQXlBSUEwQUlBMkFJQTRBSUE2QUlBLUFJQWdBTUJtQU1CcUFPBdTodWdNSlUwbE9NVG96TlRjMTRBUE1ESUFFODhEa0FZZ0U5Y0RrQVpBRUFKZ0VBUS4umgJhIU9CQ0g1Z2kFQDEUQHpyTnNJQVFvQURGN0ZLNUg0AdgEem8yXAAUUU13TVNRAaoYQUFBUEFfVREMDEFBQVcdDPReAdgCAOACyqhN6gI0aXR1bmVzLmFwcGxlLmNvbS91cy9hcHAvYXBwbmV4dXMtc2RrLWFwcC9pZDczNjg2OTgzM4ADAIgDAZADAJgDF6ADAaoDAMAD4KgByAMA0gMoCAASJDUzNjM5NjNiLTYxZWEtNGJmZS1iNzMxLTlkYTUwYWE1MmFiY9IDKAgKEiRlZjU0MDRlNC0zY2Y5LTRjM2ItOTM1MC1iNGE5YTljMDRiNTXYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIECzEwLjE0LjEyLjQ1qASE5iKyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQPMTAwOTQjU0lOMTozNTc12gQCCAHgBAHwBK-I1Un6BBIJAAAAQJbkQkARAAAAwAKaXsCCBQk3MzY4Njk4MzOIBQGYBQCgBf___________wHABQDJBQAAAAAAAPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8D_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=91d3af1f75b86ccc77cdf065374aa86b1385b11f" + ], + "id": 154485807 + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeRendererAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeRendererAd.json new file mode 100644 index 000000000..c36244b21 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerNativeRendererAd.json @@ -0,0 +1,60 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 15740033, + "auction_id": "3579836792830527402", + "nobid": false, + "no_ad_url": "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKtCKAtBAAAAwDWAAUBCIG7rucFEKqPprSK04jXMRi1zICs5JfXxSYqNgkAAAkCABEJBywAABkAAABA4XqEPyEREgApEQkAMREb8JowgdnABzjuTkDuTkgAUABYzrNsYABopJOGAXgAgAEBigEAkgEDVVNEmAEBoAEBqAEBsAEAuAEBwAEAyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzgsIDE1NTg5NDUxNTMpO3VmKCdyJywgMTU0NDg1ODA3LCAxNRk88JqSApECIXJ6N1J3UWlIaS1FTkVLLUkxVWtZQUNET3Myd3dBRGdBUUFSSTdrNVFnZG5BQjFnQVlLVUZhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUdSN3dydzRYcUVQOEVCa2U4SzhPRjZoRF9KQVNSRzBvREZWUUJBMlFFQUFBQUFBQUR3UC1BQmlzazk5UQkULG1BSUFvQUlBdFFJQQEBAHYNCJh3QUlBeUFJQTBBSUEyQUlBNEFJQTZBSUEtQUlBZ0FNQm1BTUJxQU8F1Oh1Z01KVTBsT01Ub3pOVGMxNEFQTURJQUU4OERrQVlnRTljRGtBWkFFQUpnRUFRLi6aAmEhT0JDSDVnaQVAMRRAenJOc0lBUW9BREY3Rks1SDQB2AR6bzJcABRRTXdNU1EBqhhBQUFQQV9VEQwMQUFBVx0M9DQB2AIA4ALKqE3qAjRpdHVuZXMuYXBwbGUuY29tL3VzL2FwcC9hcHBuZXh1cy1zZGstYXBwL2lkNzM2ODY5ODMzgAMAiAMBkAMAmAMXoAMBqgMAwAOsAsgDANIDKAgAEiQ1MzYzOTYzYi02MWVhLTRiZmUtYjczMS05ZGE1MGFhNTJhYmPSAygIChIkZWY1NDA0ZTQtM2NmOS00YzNiLTkzNTAtYjRhOWE5YzA0YjU12AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAsxMC4xNC4xMi40NagEhOYisgQQCAAQARisAiD6ASgAMAA4ArgEAMAEAMgEANIEDzEwMDk0I1NJTjE6MzU3NdoEAggA4AQB8ASviNVJ-gQSCQAAAECW5EJAEQAAAMACml7AggUJNzM2CfwgiAUBmAUAoAX_EQEYAcAFAMkFAAUBFPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8L_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=6f2fa33f3b83d94aacc2346e5345dead47934579", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "ads": [ + { + "content_source": "rtb", + "ad_type": "native", + "buyer_member_id": 10094, + "creative_id": 154485807, + "media_type_id": 12, + "media_subtype_id": 65, + "brand_category_id": 0, + "renderer_url": "https://dcdn.adnxs.com/renderer-content/b6da3b80-39c5-43f0-a37d-bbfa6a348aed", + "renderer_id": 258, + "client_initiated_ad_counting": true, + "viewability": { + "config": "" + }, + "rtb": { + "native": { + "title": "Native Renderer Campaign", + "desc": "Native Renderer Campaign", + "sponsored": "Abhishek Sharma", + "ctatext": "NativeRendererCampaign", + "icon": { + "url": "https://vcdn.adnxs.com/p/creative-image/73/0d/53/85/730d5385-8952-4f74-9700-693fe2f17da0.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "main_img": { + "url": "https://vcdn.adnxs.com/p/creative-image/66/91/f0/ab/6691f0ab-d2a3-47c8-a1fb-dfdac2a80cc2.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "link": { + "url": "https://appnexus.com", + "click_trackers": [ + "https://sin1-mobile.adnxs.com/click?exSuR-F6hD97FK5H4XqEPwAAAEDheoQ_exSuR-F6hD97FK5H4XqEP6qHiaaYIq4xNSaARb5ciyaBnetcAAAAAIEs8ABuJwAAbicAAAIAAAAvRDUJzhkbAAAAAABVU0QAVVNEAAEAAQCkiQAAAAABAQQCAAAAAMIAfSJ4VQAAAAA./cpcpm=AAAAAAAAAAA=/bcr=AAAAAAAA8D8=/cnd=%21OBCH5giHi-ENEK-I1UkYzrNsIAQoADF7FK5H4XqEPzoJU0lOMTozNTc1QMwMSQAAAAAAAPA_UQAAAAAAAAAAWQAAAAAAAAAA/cca=MTAwOTQjU0lOMTozNTc1/bn=86603/" + ] + }, + "impression_trackers": [ + "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QK2CPA8NgQAAAMA1gAFAQiBu67nBRCqj6a0itOI1zEYtcyArOSX18UmKjYJexSuR-F6hD8RexSuR-F6hD8ZAAAAQAESACERGwApEQkAMREbqDCB2cAHOO5OQO5OSAJQr4jVSVjOs2xgAGikk4YBeMukBYABAYoBA1VTRJIFBvBPmAEBoAEBqAEBsAEAuAEBwAEEyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzhGHQAEcicBFBg0NDg1ODA3AQsZPPCakgKRAiFyejdSd1FpSGktRU5FSy1JMVVrWUFDRE9zMnd3QURnQVFBUkk3azVRZ2RuQUIxZ0FZS1VGYUFCd0FIZ0FnQUVBaUFFQWtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFTUkcwb0RGVlFCQTJRRUFBQUFBQUFEd1AtQUJpc2s5OVEJFCxtQUlBb0FJQXRRSUEBAQB2DQiYd0FJQXlBSUEwQUlBMkFJQTRBSUE2QUlBLUFJQWdBTUJtQU1CcUFPBdTodWdNSlUwbE9NVG96TlRjMTRBUE1ESUFFODhEa0FZZ0U5Y0RrQVpBRUFKZ0VBUS4umgJhIU9CQ0g1Z2kFQDEUQHpyTnNJQVFvQURGN0ZLNUg0AdgEem8yXAAUUU13TVNRAaoYQUFBUEFfVREMDEFBQVcdDPReAdgCAOACyqhN6gI0aXR1bmVzLmFwcGxlLmNvbS91cy9hcHAvYXBwbmV4dXMtc2RrLWFwcC9pZDczNjg2OTgzM4ADAIgDAZADAJgDF6ADAaoDAMAD4KgByAMA0gMoCAASJDUzNjM5NjNiLTYxZWEtNGJmZS1iNzMxLTlkYTUwYWE1MmFiY9IDKAgKEiRlZjU0MDRlNC0zY2Y5LTRjM2ItOTM1MC1iNGE5YTljMDRiNTXYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIECzEwLjE0LjEyLjQ1qASE5iKyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQPMTAwOTQjU0lOMTozNTc12gQCCAHgBAHwBK-I1Un6BBIJAAAAQJbkQkARAAAAwAKaXsCCBQk3MzY4Njk4MzOIBQGYBQCgBf___________wHABQDJBQAAAAAAAPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8D_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=91d3af1f75b86ccc77cdf065374aa86b1385b11f" + ], + "id": 154485807 + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerVideoAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerVideoAd.json new file mode 100755 index 000000000..26d7d4b15 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBBannerVideoAd.json @@ -0,0 +1,38 @@ +{ + "version": "0.0.1", + "tags": [ + { + "tag_id": 9887537, + "auction_id": "4584035484591692222", + "nobid": false, + "no_ad_url": "http://sin1-mobile.adnxs.com/it?e=wqT_3QLRBqBRAwAAAwDWAAUBCM7AsNUFEL6z_sbG__DOPxio2pHdrJ_hhhYqNgkAAAkCABEJBywAABkAAACA61HgPyEREgApEQkAMREb8GMwsb7bBDi-B0C-B0gAUABY7_U-YABokUB4AIABAZIBA1VTRJgBAaABAagBAbABALgBAMABAMgBAtABANgBAOABAPABAIoCO3VmKCdhJywgMTA4NTgwOSwgMTUyMTIyOTkwMik7AR0wcicsIDY1NTg4NzE2LDIeAPCNkgL5ASFHRGc4UmdqOTNyQUdFT3lib3g4WUFDRHY5VDR3QURnQVFBUkl2Z2RRc2I3YkJGZ0FZUGdCYUFCd0pIalNSNEFCU29nQjBrZVFBUUdZQVFHZ0FRR29BUU93QVFDNUFTbUxpSU1BQU9BX3dRRXBpNGlEQUFEZ1A4a0JkdDhpWHZYeTB6X1pBUUFBQQEDJFBBXzRBRUE5UUUBDixBbUFJQW9BSUF0UUkFEAB2DQiId0FJQXlBSUE0QUlBNkFJQS1BSUFnQU1Ca0FNQW1BTUJxQVAF0Jh1Z01SWkdWbVlYVnNkQ05UU1U0eE9qTTFOakkumgI5IThRelJHd2oFLBH8KDdfVS1JQVFvQURvYjwAiNgC6AfgAsfTAeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwAQQkbmV4dXMtc2RrLQER8LppZDczNjg2OTgzM4ADAYgDAZADAJgDF6ADAaoDAMADrALIAwDSAygIABIkZWNjZDk2MmYtZTA3Ny00MDA2LTlkNWYtZGRlNmEyM2ZjM2Ew2AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjKYBACiBAkxMC4xNC44LjGoBOhksgQOCAAQARisAiD6ATAAOAK4BADABADIBADSBBFkZWZhdWx0I1NJTjE6MzU2MtoEAggA4AQA8ATsm6MfggUJFbkgiAUBmAUAoAX_EQEYAcAFAMkFAAUBFPA_0gUJCQULYAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgA.&s=be77947eeb499e8d243abcae8af36bb8fb1e24e8&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "ads": [ + { + "content_source": "rtb", + "ad_type": "video", + "notify_url": "http://sin1-mobile.adnxs.com/vast_track/v2?info=YwAAAAMArgAFAQlOIKxaAAAAABG-md9o_MOdPxlOIKxaAAAAACDsm6MfKAAwvgc4vgdA1q4xSJn7hwFQsb7bBFgBYgItLWgBcAF4AIABAIgBAJABrAKYAfoBoAEAqAHsm6Mf&event_type=1", + "usersync_url": "http%3A%2F%2Facdn.adnxs.com%2Fib%2Fstatic%2Fusersync%2Fv4%2Fasync_usersync.html", + "buyer_member_id": 958, + "creative_id": 65588716, + "media_type_id": 4, + "media_subtype_id": 64, + "client_initiated_ad_counting": true, + "rtb": { + "video": { + "player_width": 300, + "player_height": 250, + "duration_ms": 145000, + "playback_methods": [ + "unknown" + ], + "frameworks": [], + "content": "adnxs00:00:00" + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBInterstitialAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBInterstitialAd.json new file mode 100755 index 000000000..834e7bdd8 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBInterstitialAd.json @@ -0,0 +1,39 @@ +{ + "version": "0.0.1", + "tags": [ + { + "tag_id": 13457285, + "auction_id": "2291993975392492012", + "nobid": false, + "no_ad_url": "http://nym1-ib.adnxs.com/it?e=wqT_3QLLBmxLAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEQASo2CQANAQARDQgEABkRCQAhEQkAKREJADERCfB7MIWvtQY4vgdAvgdIAFAAWPfiP2AAaJFAeACAAQGSAQNVU0SYAawCoAH6AagBAbABALgBAcABAMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMTEwNzYxNywgMTUyOTQ1MTEzMCk7dWYoJ3InLCAxMDIwNzA4MjksIDE1MhUf8JySAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCBQ8oSmdDQUtBQ0FMVUMFEARMMAkI8ExNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDkOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggA4AQB8ASt9NUw-gQSCUWHCEBKQEG0KMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUfMY_wHABQDJBQVCFADwP9IFCXUCYNgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=5fd01dbe8aba75c8a527ef1fa733fcb84ec8dd0c&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "ads": [ + { + "content_source": "rtb", + "ad_type": "banner", + "buyer_member_id": 958, + "creative_id": 102070829, + "media_type_id": 3, + "media_subtype_id": 5, + "client_initiated_ad_counting": true, + "rtb": { + "banner": { + "content": "
", + "width": 300, + "height": 250 + }, + "trackers": [ + { + "impression_urls": [ + "http://nym1-ib.adnxs.com/it?e=wqT_3QLWBmxWAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEwASo2CXsUrkfheoQ_EREJBBkADQEAIRESACkRCQAxDRqoADCFr7UGOL4HQL4HSAJQrfTVMFj34j9gAGiRQHjH0wSAAQGKAQNVU0SSAQEG9GgBmAGsAqAB-gGoAQGwAQC4AQHAAQTIAQLQAQDYAQDgAQDwAQCKAjx1ZignYScsIDExMDc2MTcsIDE1Mjk0NTExMzApO3VmKCdyJywgMTAyMDcwODI5LCAxNTI5NDUxMTMwKTuSAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCQUFBQUFKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDcOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggB4AQB8ARBdAz6BBIJRZJEQEpAEQAAAMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUf4Y_wHABQDJBQVCFADwP9IFCQlObAAAANgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=c60bf8485daaa47c88843086734eff52180ae5a5&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp" + ], + "video_events": {} + } + ] + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBNativeAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBNativeAd.json new file mode 100755 index 000000000..7796e2827 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBNativeAd.json @@ -0,0 +1,58 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 15740033, + "auction_id": "3579836792830527402", + "nobid": false, + "no_ad_url": "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKtCKAtBAAAAwDWAAUBCIG7rucFEKqPprSK04jXMRi1zICs5JfXxSYqNgkAAAkCABEJBywAABkAAABA4XqEPyEREgApEQkAMREb8JowgdnABzjuTkDuTkgAUABYzrNsYABopJOGAXgAgAEBigEAkgEDVVNEmAEBoAEBqAEBsAEAuAEBwAEAyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzgsIDE1NTg5NDUxNTMpO3VmKCdyJywgMTU0NDg1ODA3LCAxNRk88JqSApECIXJ6N1J3UWlIaS1FTkVLLUkxVWtZQUNET3Myd3dBRGdBUUFSSTdrNVFnZG5BQjFnQVlLVUZhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUdSN3dydzRYcUVQOEVCa2U4SzhPRjZoRF9KQVNSRzBvREZWUUJBMlFFQUFBQUFBQUR3UC1BQmlzazk5UQkULG1BSUFvQUlBdFFJQQEBAHYNCJh3QUlBeUFJQTBBSUEyQUlBNEFJQTZBSUEtQUlBZ0FNQm1BTUJxQU8F1Oh1Z01KVTBsT01Ub3pOVGMxNEFQTURJQUU4OERrQVlnRTljRGtBWkFFQUpnRUFRLi6aAmEhT0JDSDVnaQVAMRRAenJOc0lBUW9BREY3Rks1SDQB2AR6bzJcABRRTXdNU1EBqhhBQUFQQV9VEQwMQUFBVx0M9DQB2AIA4ALKqE3qAjRpdHVuZXMuYXBwbGUuY29tL3VzL2FwcC9hcHBuZXh1cy1zZGstYXBwL2lkNzM2ODY5ODMzgAMAiAMBkAMAmAMXoAMBqgMAwAOsAsgDANIDKAgAEiQ1MzYzOTYzYi02MWVhLTRiZmUtYjczMS05ZGE1MGFhNTJhYmPSAygIChIkZWY1NDA0ZTQtM2NmOS00YzNiLTkzNTAtYjRhOWE5YzA0YjU12AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAsxMC4xNC4xMi40NagEhOYisgQQCAAQARisAiD6ASgAMAA4ArgEAMAEAMgEANIEDzEwMDk0I1NJTjE6MzU3NdoEAggA4AQB8ASviNVJ-gQSCQAAAECW5EJAEQAAAMACml7AggUJNzM2CfwgiAUBmAUAoAX_EQEYAcAFAMkFAAUBFPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8L_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=6f2fa33f3b83d94aacc2346e5345dead47934579", + "timeout_ms": 0, + "ad_profile_id": 1266762, + "ads": [ + { + "content_source": "rtb", + "ad_type": "native", + "buyer_member_id": 10094, + "creative_id": 154485807, + "media_type_id": 12, + "media_subtype_id": 65, + "brand_category_id": 0, + "client_initiated_ad_counting": true, + "viewability": { + "config": "" + }, + "rtb": { + "native": { + "title": "Native Renderer Title", + "desc": "Native Renderer Desc", + "sponsored": "Abhishek Sharma", + "ctatext": "NativeRendererCampaign", + "icon": { + "url": "https://vcdn.adnxs.com/p/creative-image/73/0d/53/85/730d5385-8952-4f74-9700-693fe2f17da0.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "main_img": { + "url": "https://vcdn.adnxs.com/p/creative-image/66/91/f0/ab/6691f0ab-d2a3-47c8-a1fb-dfdac2a80cc2.png", + "width": 868, + "height": 996, + "prevent_crop": false + }, + "link": { + "url": "https://appnexus.com", + "click_trackers": [ + "https://sin1-mobile.adnxs.com/click?exSuR-F6hD97FK5H4XqEPwAAAEDheoQ_exSuR-F6hD97FK5H4XqEP6qHiaaYIq4xNSaARb5ciyaBnetcAAAAAIEs8ABuJwAAbicAAAIAAAAvRDUJzhkbAAAAAABVU0QAVVNEAAEAAQCkiQAAAAABAQQCAAAAAMIAfSJ4VQAAAAA./cpcpm=AAAAAAAAAAA=/bcr=AAAAAAAA8D8=/cnd=%21OBCH5giHi-ENEK-I1UkYzrNsIAQoADF7FK5H4XqEPzoJU0lOMTozNTc1QMwMSQAAAAAAAPA_UQAAAAAAAAAAWQAAAAAAAAAA/cca=MTAwOTQjU0lOMTozNTc1/bn=86603/" + ] + }, + "impression_trackers": [ + "https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QK2CPA8NgQAAAMA1gAFAQiBu67nBRCqj6a0itOI1zEYtcyArOSX18UmKjYJexSuR-F6hD8RexSuR-F6hD8ZAAAAQAESACERGwApEQkAMREbqDCB2cAHOO5OQO5OSAJQr4jVSVjOs2xgAGikk4YBeMukBYABAYoBA1VTRJIFBvBPmAEBoAEBqAEBsAEAuAEBwAEEyAEC0AEA2AEA4AEA8AEAigJZdWYoJ2EnLCAzMDM4MzE0LCAxNTU4OTQ1MTUzKTt1ZignaScsIDEwMDg3NzhGHQAEcicBFBg0NDg1ODA3AQsZPPCakgKRAiFyejdSd1FpSGktRU5FSy1JMVVrWUFDRE9zMnd3QURnQVFBUkk3azVRZ2RuQUIxZ0FZS1VGYUFCd0FIZ0FnQUVBaUFFQWtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFTUkcwb0RGVlFCQTJRRUFBQUFBQUFEd1AtQUJpc2s5OVEJFCxtQUlBb0FJQXRRSUEBAQB2DQiYd0FJQXlBSUEwQUlBMkFJQTRBSUE2QUlBLUFJQWdBTUJtQU1CcUFPBdTodWdNSlUwbE9NVG96TlRjMTRBUE1ESUFFODhEa0FZZ0U5Y0RrQVpBRUFKZ0VBUS4umgJhIU9CQ0g1Z2kFQDEUQHpyTnNJQVFvQURGN0ZLNUg0AdgEem8yXAAUUU13TVNRAaoYQUFBUEFfVREMDEFBQVcdDPReAdgCAOACyqhN6gI0aXR1bmVzLmFwcGxlLmNvbS91cy9hcHAvYXBwbmV4dXMtc2RrLWFwcC9pZDczNjg2OTgzM4ADAIgDAZADAJgDF6ADAaoDAMAD4KgByAMA0gMoCAASJDUzNjM5NjNiLTYxZWEtNGJmZS1iNzMxLTlkYTUwYWE1MmFiY9IDKAgKEiRlZjU0MDRlNC0zY2Y5LTRjM2ItOTM1MC1iNGE5YTljMDRiNTXYA_mjeuADAOgDAvgDAIAEAJIEBi91dC92M5gEAKIECzEwLjE0LjEyLjQ1qASE5iKyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQPMTAwOTQjU0lOMTozNTc12gQCCAHgBAHwBK-I1Un6BBIJAAAAQJbkQkARAAAAwAKaXsCCBQk3MzY4Njk4MzOIBQGYBQCgBf___________wHABQDJBQAAAAAAAPA_0gUJCQULdAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgC4BgDBBgEfLAAA8D_IBgDaBhYKEAkQGQFEEAAYAOAGDPIGAggAgAcBiAcA&s=91d3af1f75b86ccc77cdf065374aa86b1385b11f" + ], + "id": 154485807 + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBVideoAd.json b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBVideoAd.json new file mode 100755 index 000000000..26d7d4b15 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/StubResponse/RTBVideoAd.json @@ -0,0 +1,38 @@ +{ + "version": "0.0.1", + "tags": [ + { + "tag_id": 9887537, + "auction_id": "4584035484591692222", + "nobid": false, + "no_ad_url": "http://sin1-mobile.adnxs.com/it?e=wqT_3QLRBqBRAwAAAwDWAAUBCM7AsNUFEL6z_sbG__DOPxio2pHdrJ_hhhYqNgkAAAkCABEJBywAABkAAACA61HgPyEREgApEQkAMREb8GMwsb7bBDi-B0C-B0gAUABY7_U-YABokUB4AIABAZIBA1VTRJgBAaABAagBAbABALgBAMABAMgBAtABANgBAOABAPABAIoCO3VmKCdhJywgMTA4NTgwOSwgMTUyMTIyOTkwMik7AR0wcicsIDY1NTg4NzE2LDIeAPCNkgL5ASFHRGc4UmdqOTNyQUdFT3lib3g4WUFDRHY5VDR3QURnQVFBUkl2Z2RRc2I3YkJGZ0FZUGdCYUFCd0pIalNSNEFCU29nQjBrZVFBUUdZQVFHZ0FRR29BUU93QVFDNUFTbUxpSU1BQU9BX3dRRXBpNGlEQUFEZ1A4a0JkdDhpWHZYeTB6X1pBUUFBQQEDJFBBXzRBRUE5UUUBDixBbUFJQW9BSUF0UUkFEAB2DQiId0FJQXlBSUE0QUlBNkFJQS1BSUFnQU1Ca0FNQW1BTUJxQVAF0Jh1Z01SWkdWbVlYVnNkQ05UU1U0eE9qTTFOakkumgI5IThRelJHd2oFLBH8KDdfVS1JQVFvQURvYjwAiNgC6AfgAsfTAeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwAQQkbmV4dXMtc2RrLQER8LppZDczNjg2OTgzM4ADAYgDAZADAJgDF6ADAaoDAMADrALIAwDSAygIABIkZWNjZDk2MmYtZTA3Ny00MDA2LTlkNWYtZGRlNmEyM2ZjM2Ew2AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjKYBACiBAkxMC4xNC44LjGoBOhksgQOCAAQARisAiD6ATAAOAK4BADABADIBADSBBFkZWZhdWx0I1NJTjE6MzU2MtoEAggA4AQA8ATsm6MfggUJFbkgiAUBmAUAoAX_EQEYAcAFAMkFAAUBFPA_0gUJCQULYAAAANgFAeAFAfAFAfoFBAgAEACQBgGYBgA.&s=be77947eeb499e8d243abcae8af36bb8fb1e24e8&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "ads": [ + { + "content_source": "rtb", + "ad_type": "video", + "notify_url": "http://sin1-mobile.adnxs.com/vast_track/v2?info=YwAAAAMArgAFAQlOIKxaAAAAABG-md9o_MOdPxlOIKxaAAAAACDsm6MfKAAwvgc4vgdA1q4xSJn7hwFQsb7bBFgBYgItLWgBcAF4AIABAIgBAJABrAKYAfoBoAEAqAHsm6Mf&event_type=1", + "usersync_url": "http%3A%2F%2Facdn.adnxs.com%2Fib%2Fstatic%2Fusersync%2Fv4%2Fasync_usersync.html", + "buyer_member_id": 958, + "creative_id": 65588716, + "media_type_id": 4, + "media_subtype_id": 64, + "client_initiated_ad_counting": true, + "rtb": { + "video": { + "player_width": 300, + "player_height": 250, + "duration_ms": 145000, + "playback_methods": [ + "unknown" + ], + "frameworks": [], + "content": "adnxs00:00:00" + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.h new file mode 100644 index 000000000..be1a71a51 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.h @@ -0,0 +1,26 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import "ANGlobal.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ANGlobal (ANTest) + ++ (void) constructAdServerRequestURL; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.m new file mode 100644 index 000000000..8813e6f17 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANGlobal+ANTest.m @@ -0,0 +1,25 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +#import +#import "ANGDPRSettings.h" +#import "ANGlobal+ANTest.h" +#import "ANSDKSettings+PrivateMethods.h" +#import "ANHTTPCookieStorage.h" +#import "ANWebView.h" + +@implementation ANGlobal (ANTest) + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.h new file mode 100644 index 000000000..c3a1e8203 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.h @@ -0,0 +1,31 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +@interface ANHTTPCookieStorage : NSObject + ++ (instancetype)sharedInstance; + +@property (nonatomic, readwrite, nullable) NSDictionary *adFetcherRequestCookie; +@property (nonatomic, readwrite, nullable) NSDictionary *adFetcherResponseCookie; +@property (nonatomic, readwrite,nullable) NSDictionary *bannerWebViewCookie; +@property (nonatomic, readwrite,nullable) NSDictionary *videoAdPlayerCookie; +-(NSDictionary *) getCurrentCookie; +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.m new file mode 100644 index 000000000..39fe289d6 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPCookieStorage.m @@ -0,0 +1,41 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANHTTPCookieStorage.h" +#import "ANSDKSettings+PrivateMethods.h" + +@implementation ANHTTPCookieStorage + + ++ (instancetype)sharedInstance { + static dispatch_once_t onceToken; + static ANHTTPCookieStorage *cookieObject; + dispatch_once(&onceToken, ^{ + cookieObject = [[ANHTTPCookieStorage alloc] init]; + }); + return cookieObject; +} + +-(NSDictionary *) getCurrentCookie{ + NSString *urlString = [[[ANSDKSettings sharedInstance] baseUrlConfig] webViewBaseUrl]; + NSURL *URL = [NSURL URLWithString:urlString]; + NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:URL]; + NSDictionary *cookieHeaders; + cookieHeaders = [ NSHTTPCookie requestHeaderFieldsWithCookies: cookies]; + return cookieHeaders; +} + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPNetworkSession+ANTest.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPNetworkSession+ANTest.h new file mode 100644 index 000000000..812dbe7a3 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPNetworkSession+ANTest.h @@ -0,0 +1,26 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import "ANHTTPNetworkSession.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ANHTTPNetworkSession (ANTest) + +@property (nonatomic, strong) NSURLSession * adServerSession; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.h new file mode 100644 index 000000000..ab210b6b4 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.h @@ -0,0 +1,23 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +extern NSString *const kANHTTPStubURLProtocolRequestDidLoadNotification; +extern NSString *const kANHTTPStubURLProtocolRequest; + +@interface ANHTTPStubURLProtocol : NSURLProtocol + +@end \ No newline at end of file diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.m new file mode 100644 index 000000000..af6b37161 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubURLProtocol.m @@ -0,0 +1,117 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANHTTPStubURLProtocol.h" +#import "ANHTTPStubbingManager.h" + + + +static NSString *const kANTestHTTPStubURLProtocolExceptionKey = @"kANTestHTTPStubURLProtocolExceptionKey"; +NSString *const kANHTTPStubURLProtocolRequestDidLoadNotification = @"kANHTTPStubURLProtocolRequestDidLoadNotification"; +NSString *const kANHTTPStubURLProtocolRequest = @"kANHTTPStubURLProtocolRequest"; + + + +@implementation ANHTTPStubURLProtocol + ++ (BOOL)canInitWithRequest:(NSURLRequest *)request +{ + BOOL broadcastRequests = [ANHTTPStubbingManager sharedStubbingManager].broadcastRequests; + + if (broadcastRequests && request) { + [[NSNotificationCenter defaultCenter] postNotificationName:kANHTTPStubURLProtocolRequestDidLoadNotification + object:nil + userInfo:@{kANHTTPStubURLProtocolRequest:request}]; + } + + BOOL isHttpOrHttps = [request.URL.scheme isEqualToString:@"http"] || [request.URL.scheme isEqualToString:@"https"]; + if (!isHttpOrHttps) { + return NO; + } + + BOOL ignoreUnstubbedRequests = [ANHTTPStubbingManager sharedStubbingManager].ignoreUnstubbedRequests; + if (ignoreUnstubbedRequests) { + ANURLConnectionStub *stub = [[ANHTTPStubbingManager sharedStubbingManager] stubForURLString:request.URL.absoluteString]; + return (stub != nil); + } else { + return YES; + } +} + ++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { + return request; +} + ++ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b { + return NO; +} + +- (void)startLoading { + id client = self.client; + ANURLConnectionStub *stub = [self stubForRequest]; + + if (stub) { + NSURLResponse *response = [self buildResponseForRequestUsingStub:stub]; + [client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; + + NSData *responseData = [self buildDataForRequestUsingStub:stub]; + [client URLProtocol:self didLoadData:responseData]; + + [client URLProtocolDidFinishLoading:self]; + NSLog(@"Successfully loaded request from stub: %@", [self request]); + + } else { + NSLog(@"Could not load request successfully: %@", [self request]); + NSLog(@"This can happen if the request was not stubbed, or if the stubs were removed before this request was completed (due to asynchronous request loading)."); + [client URLProtocol: self + didFailWithError: [NSError errorWithDomain: kANTestHTTPStubURLProtocolExceptionKey + code: 1 + userInfo: nil ] + ]; + } +} + +- (void)stopLoading { + // Do nothing, but method is required. +} + + + + +#pragma mark - Stubbing + +- (ANURLConnectionStub *)stubForRequest { + return [[ANHTTPStubbingManager sharedStubbingManager] stubForURLString:self.request.URL.absoluteString]; +} + + +- (NSURLResponse *)buildResponseForRequestUsingStub:(ANURLConnectionStub *)stub { + NSHTTPURLResponse *httpResponse = [[NSHTTPURLResponse alloc] initWithURL:[[self request] URL] + statusCode:stub.responseCode + HTTPVersion:@"HTTP/1.1" + headerFields:@{}]; + return httpResponse; +} + +- (NSData *)buildDataForRequestUsingStub:(ANURLConnectionStub *)stub { + if ([stub.responseBody isKindOfClass:[NSString class]]) { + return [stub.responseBody dataUsingEncoding:NSUTF8StringEncoding]; + } else if ([stub.responseBody isKindOfClass:[NSData class]]) { + return stub.responseBody; + } + return nil; +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.h new file mode 100644 index 000000000..6282389db --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.h @@ -0,0 +1,57 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANHTTPStubURLProtocol.h" +#import "ANURLConnectionStub.h" + + + + +@interface ANHTTPStubbingManager : NSObject + +/** + If set to YES, then unstubbed requests will be ignored by this class and handled by the system. + If set to NO (default), then unstubbed requests will result in didFailToLoad errors. + + Default is NO. + */ +@property (nonatomic) BOOL ignoreUnstubbedRequests; + +/** + If set to YES, then all requests which trigger canInitWithRequest: will be broadcast + as kANHTTPStubURLProtocolRequestDidLoadNotification notifications. The request will be in the user info, + as the value of the kANHTTPStubURLProtocolRequest key. + + Default is NO. + */ +@property (nonatomic) BOOL broadcastRequests; + + + ++ (ANHTTPStubbingManager *)sharedStubbingManager; + +- (void)enable; +- (void)disable; + +- (void)addStub:(ANURLConnectionStub *)stub; +- (void)addStubs:(NSArray *)stubs; +- (void)removeAllStubs; + +- (ANURLConnectionStub *)stubForURLString:(NSString *)URLString; + +// ++ (NSDictionary *) jsonBodyOfURLRequestAsDictionary: (NSURLRequest *)urlRequest; + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.m new file mode 100644 index 000000000..9db51e782 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANHTTPStubbingManager.m @@ -0,0 +1,113 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANHTTPStubbingManager.h" +#import "ANHTTPStubURLProtocol.h" +#import "ANSDKSettings.h" + +#import "NSURLRequest+HTTPBodyTesting.h" + + + + +@interface ANHTTPStubbingManager() +@property (nonatomic) NSMutableArray *stubs; +@end + + + + +@implementation ANHTTPStubbingManager + ++ (ANHTTPStubbingManager *)sharedStubbingManager { + static dispatch_once_t sharedStubbingManagerToken; + static ANHTTPStubbingManager *manager; + dispatch_once(&sharedStubbingManagerToken, ^{ + manager = [[ANHTTPStubbingManager alloc] init]; + }); + return manager; +} + +- (void)enable { + [NSURLProtocol registerClass:[ANHTTPStubURLProtocol class]]; +} + +- (void)disable { + [NSURLProtocol unregisterClass:[ANHTTPStubURLProtocol class]]; +} + +- (void)addStub:(ANURLConnectionStub *)stub { + [self.stubs addObject:stub]; +} + +- (void)addStubs:(NSArray *)stubs { + [self.stubs addObjectsFromArray:stubs]; +} + +- (void)removeAllStubs { + [self.stubs removeAllObjects]; +} + +- (NSMutableArray *)stubs { + @synchronized(self) { + if (!_stubs) _stubs = [[NSMutableArray alloc] init]; + return _stubs; + } +} + +- (ANURLConnectionStub *)stubForURLString:(NSString *)URLString +{ + __block ANURLConnectionStub *stubMatch = nil; + + [self.stubs enumerateObjectsUsingBlock: ^(ANURLConnectionStub *stub, NSUInteger idx, BOOL *stop) + { + NSError *error; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern: stub.requestURL + options: NSRegularExpressionDotMatchesLineSeparators + error: &error]; + if ([regex numberOfMatchesInString: URLString + options: 0 + range: NSMakeRange(0, [URLString length])]) + { + stubMatch = stub; + *stop = YES; + } + } ]; + return stubMatch; +} + + + + +#pragma mark - Helper class methods. + ++ (NSDictionary *) jsonBodyOfURLRequestAsDictionary: (NSURLRequest *)urlRequest +{ +// TESTTRACE(); + + NSString *bodyAsString = [[NSString alloc] initWithData:[urlRequest ANHTTPStubs_HTTPBody] encoding:NSUTF8StringEncoding]; + NSData *objectData = [bodyAsString dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error = nil; + + NSDictionary *json = [NSJSONSerialization JSONObjectWithData: objectData + options: NSJSONReadingMutableContainers + error: &error]; + if (error) { return nil; } + + return json; +} + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.h new file mode 100644 index 000000000..b34ee578a --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.h @@ -0,0 +1,29 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ANStubManager : NSObject + ++ (instancetype)sharedInstance; + +-(void) enableStubbing; +-(void) disableStubbing; +-(void)stubRequestWithResponse:(NSString *)responseName; +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.m new file mode 100644 index 000000000..55f03495a --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANStubManager.m @@ -0,0 +1,59 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANStubManager.h" +#import "ANHTTPStubbingManager.h" +#import "ANSDKSettings+PrivateMethods.h" + +@implementation ANStubManager + + ++ (instancetype)sharedInstance { + static dispatch_once_t onceToken; + static ANStubManager *anStubManager; + dispatch_once(&onceToken, ^{ + anStubManager = [[ANStubManager alloc] init]; + }); + return anStubManager; +} + +-(void) enableStubbing{ + [[ANHTTPStubbingManager sharedStubbingManager] enable]; + [ANHTTPStubbingManager sharedStubbingManager].ignoreUnstubbedRequests = YES; +} + +-(void) disableStubbing{ + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANHTTPStubbingManager sharedStubbingManager] disable]; +} + + +- (void)stubRequestWithResponse:(NSString *)responseName +{ + NSBundle *currentBundle = [NSBundle bundleForClass:[self class]]; + + NSString *baseResponse = [NSString stringWithContentsOfFile: [currentBundle pathForResource:responseName ofType:@"json"] + encoding: NSUTF8StringEncoding + error: nil ]; + + ANURLConnectionStub *requestStub = [[ANURLConnectionStub alloc] init]; + requestStub.requestURL = [[[ANSDKSettings sharedInstance] baseUrlConfig] utAdRequestBaseUrl]; + requestStub.responseCode = 200; + requestStub.responseBody = baseResponse; + + [[ANHTTPStubbingManager sharedStubbingManager] addStub:requestStub]; +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub+NSURLSessionConfiguration.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub+NSURLSessionConfiguration.m new file mode 100644 index 000000000..d1b6ff7d5 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub+NSURLSessionConfiguration.m @@ -0,0 +1,71 @@ +/* Copyright 2017 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +#import "ANURLConnectionStub.h" +#import "NSObject+Swizzling.h" +#import "ANHTTPNetworkSession+ANTest.h" +#import "ANGlobal+ANTest.h" + + + +/** + * This helper is used to swizzle NSURLSessionConfiguration constructor methods + * defaultSessionConfiguration and ephemeralSessionConfiguration to insert the private + * OHHTTPStubsProtocol into their protocolClasses array so that OHHTTPStubs is automagically + * supported when you create a new NSURLSession based on one of there configurations. + */ + +typedef NSURLSessionConfiguration*(*SessionConfigConstructor)(id,SEL); +static SessionConfigConstructor orig_defaultSessionConfiguration; +static SessionConfigConstructor orig_ephemeralSessionConfiguration; + +static NSURLSessionConfiguration* ANHTTPStubs_defaultSessionConfiguration(id self, SEL _cmd) +{ + NSURLSessionConfiguration* config = orig_defaultSessionConfiguration(self,_cmd); // call original method + [ANURLConnectionStub setEnabled:YES forSessionConfiguration:config]; // + return config; +} + +static NSURLSessionConfiguration* ANHTTPStubs_ephemeralSessionConfiguration(id self, SEL _cmd) +{ + NSURLSessionConfiguration* config = orig_ephemeralSessionConfiguration(self,_cmd); // call original method + [ANURLConnectionStub setEnabled:YES forSessionConfiguration:config]; // + return config; +} + +@interface NSURLSessionConfiguration(ANHTTPStubsSupport) @end + +@implementation NSURLSessionConfiguration(ANHTTPStubsSupport) + ++(void)load +{ + + orig_defaultSessionConfiguration = (SessionConfigConstructor)ANHTTPStubsReplaceMethod(@selector(defaultSessionConfiguration), + (IMP)ANHTTPStubs_defaultSessionConfiguration, + [NSURLSessionConfiguration class], + YES); + orig_ephemeralSessionConfiguration = (SessionConfigConstructor)ANHTTPStubsReplaceMethod(@selector(ephemeralSessionConfiguration), + (IMP)ANHTTPStubs_ephemeralSessionConfiguration, + [NSURLSessionConfiguration class], + YES); + + // Recreated network session and mutable request after http stubbing is enabled. + [[ANHTTPNetworkSession sharedInstance]setAdServerSession:[NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:[ANHTTPNetworkSession sharedInstance] delegateQueue:nil]]; + [ANGlobal constructAdServerRequestURL]; +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.h new file mode 100644 index 000000000..4dfc850db --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.h @@ -0,0 +1,78 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + + + + +@interface ANURLConnectionStub : NSObject + +@property (nonatomic, readwrite, strong) NSString *requestURL; +@property (nonatomic, readwrite, assign) NSInteger responseCode; +@property (nonatomic, readwrite, strong) id responseBody; //can be nsstring or nsdata + ++ (ANURLConnectionStub *)stubForStandardBannerWithAdSize:(CGSize)adSize + content:(NSString *)content; + ++ (ANURLConnectionStub *)stubForStandardBannerWithAdSize:(CGSize)adSize + contentFromResource:(NSString *)resource + ofType:(NSString *)type; + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type; + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type + withRequestURL:(NSString *)pattern; + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type + withRequestURL:(NSString *)pattern + inBundle:(NSBundle *)bundle; + ++ (ANURLConnectionStub *)stubForMraidFile; + +/** + * Enable or disable the stubs on a given `NSURLSessionConfiguration`. + * + * @param enabled If `YES`, enables the stubs for this `NSURLSessionConfiguration`. + * If `NO`, disable the stubs and let all the requests hit the real world + * @param sessionConfig The NSURLSessionConfiguration on which to enabled/disable the stubs + * + * @note OHHTTPStubs are enabled by default on newly created `defaultSessionConfiguration` + * and `ephemeralSessionConfiguration`, so there is no need to call this method with + * `YES` for stubs to work. You generally only use this if you want to disable + * `OHTTPStubs` per `NSURLSession` by calling it before building the `NSURLSession` + * with the `NSURLSessionConfiguration`. + * + * @note Important: As usual according to the way `NSURLSessionConfiguration` works, you + * MUST set this property BEFORE creating the `NSURLSession`. Once the `NSURLSession` + * object is created, they use a deep copy of the `NSURLSessionConfiguration` object + * used to create them, so changing the configuration later does not affect already + * created sessions. + */ ++ (void)setEnabled:(BOOL)enabled forSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig; + +/** + * Whether stubs are enabled or disabled on a given `NSURLSessionConfiguration` + * + * @param sessionConfig The NSURLSessionConfiguration on which to enable/disable the stubs + * + * @return If `YES` the stubs are enabled for sessionConfig. If `NO` then the stubs are disabled + */ ++ (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig; + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.m new file mode 100644 index 000000000..f18a9b07b --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/ANURLConnectionStub.m @@ -0,0 +1,186 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANURLConnectionStub.h" +#import "ANSDKSettings+PrivateMethods.h" +#import "ANHTTPStubURLProtocol.h" + +@implementation ANURLConnectionStub + +- (id)copyWithZone:(NSZone *)zone { + ANURLConnectionStub *newStub = [[ANURLConnectionStub alloc] init]; + newStub.requestURL = self.requestURL; + newStub.responseCode = self.responseCode; + newStub.responseBody = self.responseBody; + return newStub; +} + +- (BOOL)isEqual:(ANURLConnectionStub *)object { + BOOL sameRequestURLString = [self.requestURL isEqualToString:object.requestURL]; + BOOL sameResponseCode = (self.responseCode == object.responseCode); + BOOL sameResponseBody = [self.responseBody isEqualToString:object.responseBody]; + return sameRequestURLString && sameResponseBody && sameResponseCode; +} + +- (NSUInteger)hash { + NSMutableString *description = [[NSMutableString alloc] init]; + [description appendString:self.requestURL]; + [description appendString:[NSString stringWithFormat:@"%ld", (long)self.responseCode]]; + [description appendString:self.responseBody]; + return [description hash]; +} + +- (NSString *)description { + return [NSString stringWithFormat:@"NSURLConnectionStub: \n\ + Request URL Pattern: %@,\n\ + Response Code: %ld,\n\ + Response Body: %@",self.requestURL, (long)self.responseCode, self.responseBody]; + +} + + + + +#pragma mark - Pre-Initialized Stubbers + ++ (ANURLConnectionStub *)stubForStandardBannerWithAdSize:(CGSize)adSize + contentFromResource:(NSString *)resource + ofType:(NSString *)type { + NSString *filePath = [[NSBundle mainBundle] pathForResource:resource + ofType:type]; + NSString *content = [[NSString alloc] initWithContentsOfFile:filePath + encoding:NSUTF8StringEncoding + error:nil]; + return [ANURLConnectionStub stubForStandardBannerWithAdSize:adSize + content:content]; +} + ++ (ANURLConnectionStub *)stubForStandardBannerWithAdSize:(CGSize)adSize + content:(NSString *)content { + ANURLConnectionStub *stub = [[ANURLConnectionStub alloc] init]; + stub.requestURL = [[ANSDKSettings sharedInstance].baseUrlConfig utAdRequestBaseUrl]; + stub.responseCode = 200; + stub.responseBody = [NSJSONSerialization dataWithJSONObject:[[self class] responseForStandardBannerWithAdSize:adSize + content:content] + options:0 + error:nil]; + return stub; +} + ++ (ANURLConnectionStub *)stubForMraidFile { + ANURLConnectionStub *stub = [[ANURLConnectionStub alloc] init]; + stub.requestURL = [[[ANSDKSettings sharedInstance].baseUrlConfig webViewBaseUrl] stringByAppendingString:@"mraid.js"]; + stub.responseBody = @""; + stub.responseCode = 200; + return stub; +} + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type { + return [ANURLConnectionStub stubForResource:resource + ofType:type + withRequestURL:resource + inBundle:[NSBundle mainBundle]]; +} + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type + withRequestURL:(NSString *)pattern { + return [ANURLConnectionStub stubForResource:resource + ofType:type + withRequestURL:pattern + inBundle:[NSBundle mainBundle]]; +} + ++ (ANURLConnectionStub *)stubForResource:(NSString *)resource + ofType:(NSString *)type + withRequestURL:(NSString *)pattern + inBundle:(NSBundle *)bundle { + ANURLConnectionStub *stub = [[ANURLConnectionStub alloc] init]; + stub.responseCode = 200; + stub.requestURL = pattern; + stub.responseBody = [NSData dataWithContentsOfFile:[bundle pathForResource:resource + ofType:type]]; + return stub; +} + ++ (NSDictionary *)responseForStandardBannerWithAdSize:(CGSize)adSize + content:(NSString *)content { + NSMutableDictionary *response = [[NSMutableDictionary alloc] init]; + response[@"status"] = @"ok"; + NSDictionary *adElement = [[self class] adElementForAdType:@"banner" + adSize:adSize + content:content]; + response[@"ads"] = @[adElement]; + return [response copy]; +} + ++ (NSDictionary *)adElementForAdType:(NSString *)type + adSize:(CGSize)adSize + content:(NSString *)content { + NSMutableDictionary *adElement = [[NSMutableDictionary alloc] init]; + adElement[@"type"] = type; + adElement[@"width"] = [@(adSize.width) description]; + adElement[@"height"] = [@(adSize.height) description]; + adElement[@"content"] = content; + return [adElement copy]; +} + ++ (void)setEnabled:(BOOL)enable forSessionConfiguration:(NSURLSessionConfiguration*)sessionConfig +{ + // Runtime check to make sure the API is available on this version + if ( [sessionConfig respondsToSelector:@selector(protocolClasses)] + && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) + { + NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; + Class protoCls = ANHTTPStubURLProtocol.class; + if (enable && ![urlProtocolClasses containsObject:protoCls]) + { + [urlProtocolClasses insertObject:protoCls atIndex:0]; + } + else if (!enable && [urlProtocolClasses containsObject:protoCls]) + { + [urlProtocolClasses removeObject:protoCls]; + } + sessionConfig.protocolClasses = urlProtocolClasses; + } + else + { + NSLog(@"[ANURLConnectionStub] %@ is only available when running on iOS7+/OSX9+. " + @"Use conditions like 'if ([NSURLSessionConfiguration class])' to only call " + @"this method if the user is running iOS7+/OSX9+.", NSStringFromSelector(_cmd)); + } +} + ++ (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig +{ + // Runtime check to make sure the API is available on this version + if ( [sessionConfig respondsToSelector:@selector(protocolClasses)] + && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) + { + NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; + Class protoCls = ANHTTPStubURLProtocol.class; + return [urlProtocolClasses containsObject:protoCls]; + } + else + { + NSLog(@"[ANURLConnectionStub] %@ is only available when running on iOS7+/OSX9+. " + @"Use conditions like 'if ([NSURLSessionConfiguration class])' to only call " + @"this method if the user is running iOS7+/OSX9+.", NSStringFromSelector(_cmd)); + return NO; + } +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.h new file mode 100644 index 000000000..43539034b --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.h @@ -0,0 +1,46 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@interface NSObject (Swizzling) + ++ (void)exchangeClassSelector:(SEL)originalSelector + withSelector:(SEL)swizzledSelector; ++ (void)exchangeInstanceSelector:(SEL)originalSelector + withSelector:(SEL)swizzledSelector; + +/** + * Replaces the selector's associated method implementation with the + * given implementation (or adds it, if there was no existing one). + * + * @param selector The selector entry in the dispatch table. + * @param newImpl The implementation that will be associated with + * the given selector. + * @param affectedClass The class whose dispatch table will be altered. + * @param isClassMethod Set to YES if the selector denotes a class + * method, or NO if it is an instance method. + * @return The previous implementation associated with + * the swizzled selector. You should store the + * implementation and call it when overwriting + * the selector. + */ +__attribute__((warn_unused_result)) IMP ANHTTPStubsReplaceMethod(SEL selector, + IMP newImpl, + Class affectedClass, + BOOL isClassMethod); + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.m new file mode 100644 index 000000000..9ec175b84 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSObject+Swizzling.m @@ -0,0 +1,77 @@ +/* Copyright 2014 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "NSObject+Swizzling.h" +#import + +@implementation NSObject (Swizzling) + ++ (void)exchangeClassSelector:(SEL)originalSelector withSelector:(SEL)swizzledSelector { + Class class = object_getClass((id)self); + + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + + BOOL didAddMethod = class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } +} + ++ (void)exchangeInstanceSelector:(SEL)originalSelector withSelector:(SEL)swizzledSelector { + Class class = [self class]; + + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + + BOOL didAddMethod = class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } +} + +IMP ANHTTPStubsReplaceMethod(SEL selector, + IMP newImpl, + Class affectedClass, + BOOL isClassMethod) +{ + Method origMethod = isClassMethod ? class_getClassMethod(affectedClass, selector) : class_getInstanceMethod(affectedClass, selector); + IMP origImpl = method_getImplementation(origMethod); + + if (!class_addMethod(isClassMethod ? object_getClass(affectedClass) : affectedClass, selector, newImpl, method_getTypeEncoding(origMethod))) + { + method_setImplementation(origMethod, newImpl); + } + + return origImpl; +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.h b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.h new file mode 100644 index 000000000..8f8779176 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.h @@ -0,0 +1,31 @@ +/* Copyright 2017 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +// This category is only useful when NSURLSession is present + +@interface NSURLRequest (HTTPBodyTesting) +/** + * Unfortunately, when sending POST requests (with a body) using NSURLSession, + * by the time the request arrives at OHHTTPStubs, the HTTPBody of the + * NSURLRequest has been reset to nil. + * + * You can use this method to retrieve the HTTPBody for testing and use it to + * conditionally stub your requests. + */ +- (NSData *)ANHTTPStubs_HTTPBody; + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.m b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.m new file mode 100644 index 000000000..655aa9b32 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/Stubbing/NSURLRequest+HTTPBodyTesting.m @@ -0,0 +1,70 @@ +/* Copyright 2017 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "NSURLRequest+HTTPBodyTesting.h" + +#import "NSObject+Swizzling.h" + +#pragma mark - NSURLRequest+CustomHTTPBody + +NSString * const ANHTTPStubs_HTTPBodyKey = @"HTTPBody"; + +@implementation NSURLRequest (HTTPBodyTesting) + +- (NSData*)ANHTTPStubs_HTTPBody +{ + return [NSURLProtocol propertyForKey:ANHTTPStubs_HTTPBodyKey inRequest:self]; +} + +@end + +//////////////////////////////////////////////////////////////////////////////// +#pragma mark - NSMutableURLRequest+HTTPBodyTesting + +typedef void(*ANHHTTPStubsSetterIMP)(id, SEL, id); +static ANHHTTPStubsSetterIMP orig_setHTTPBody; + +static void ANHTTPStubs_setHTTPBody(id self, SEL _cmd, NSData* HTTPBody) +{ + // store the http body via NSURLProtocol + if (HTTPBody) { + [NSURLProtocol setProperty:HTTPBody forKey:ANHTTPStubs_HTTPBodyKey inRequest:self]; + } else { + // unfortunately resetting does not work properly as the NSURLSession also uses this to reset the property + } + + orig_setHTTPBody(self, _cmd, HTTPBody); +} + +/** + * Swizzles setHTTPBody: in order to maintain a copy of the http body for later + * reference and calls the original implementation. + * + * @warning Should not be used in production, testing only. + */ +@interface NSMutableURLRequest (HTTPBodyTesting) @end + +@implementation NSMutableURLRequest (HTTPBodyTesting) + ++ (void)load +{ + orig_setHTTPBody = (ANHHTTPStubsSetterIMP)ANHTTPStubsReplaceMethod(@selector(setHTTPBody:), + (IMP)ANHTTPStubs_setHTTPBody, + [NSMutableURLRequest class], + NO); +} + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_BannerAd.json b/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_BannerAd.json new file mode 100644 index 000000000..b0be4cd1f --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_BannerAd.json @@ -0,0 +1,39 @@ +{ + "version": "0.0.1", + "tags": [ + { + "tag_id": 13457285, + "auction_id": "2291993975392492012", + "nobid": false, + "no_ad_url": "http://nym1-ib.adnxs.com/it?e=wqT_3QLLBmxLAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEQASo2CQANAQARDQgEABkRCQAhEQkAKREJADERCfB7MIWvtQY4vgdAvgdIAFAAWPfiP2AAaJFAeACAAQGSAQNVU0SYAawCoAH6AagBAbABALgBAcABAMgBAtABANgBAOABAPABAIoCPHVmKCdhJywgMTEwNzYxNywgMTUyOTQ1MTEzMCk7dWYoJ3InLCAxMDIwNzA4MjksIDE1MhUf8JySAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCBQ8oSmdDQUtBQ0FMVUMFEARMMAkI8ExNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDkOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggA4AQB8ASt9NUw-gQSCUWHCEBKQEG0KMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUfMY_wHABQDJBQVCFADwP9IFCXUCYNgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=5fd01dbe8aba75c8a527ef1fa733fcb84ec8dd0c&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "ads": [ + { + "content_source": "rtb", + "ad_type": "banner", + "buyer_member_id": 958, + "creative_id": 102070829, + "media_type_id": 1, + "media_subtype_id": 1, + "client_initiated_ad_counting": true, + "rtb": { + "banner": { + "content": "
", + "width": 300, + "height": 250 + }, + "trackers": [ + { + "impression_urls": [ + "http://nym1-ib.adnxs.com/it?e=wqT_3QLWBmxWAwAAAwDWAAUBCPqkptkFEOyz69SIjLPnHxj_EQEwASo2CXsUrkfheoQ_EREJBBkADQEAIRESACkRCQAxDRqoADCFr7UGOL4HQL4HSAJQrfTVMFj34j9gAGiRQHjH0wSAAQGKAQNVU0SSAQEG9GgBmAGsAqAB-gGoAQGwAQC4AQHAAQTIAQLQAQDYAQDgAQDwAQCKAjx1ZignYScsIDExMDc2MTcsIDE1Mjk0NTExMzApO3VmKCdyJywgMTAyMDcwODI5LCAxNTI5NDUxMTMwKTuSAvkBIU5qdWd5Z2lmMnVrS0VLMzAxVEFZQUNEMzRqOHdBRGdBUUFSSXZnZFFoYS0xQmxnQVlQX19fXzhQYUFCd0FYZ0JnQUVCaUFFQmtBRUJtQUVCb0FFQnFBRURzQUVBdVFHUjd3cnc0WHFFUDhFQmtlOEs4T0Y2aERfSkFaZmk4WFhnd2UwXzJRRUFBQUFBQUFEd1AtQUJBUFVCQUFBQUFKZ0NBS0FDQUxVQ0FBQUFBTDBDQUFBQUFNQUNBY2dDQWRBQ0FkZ0NBZUFDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEbjlycENyb0RDVTVaVFRJNk16WXpOUS4umgItIUd3cFB0Zzb8APDcOS1JX0lBUW9BRG9KVGxsTk1qb3pOak0x2ALoB-ACx9MB6gI9cGxheS5nb29nbGUuY29tL3N0b3JlL2FwcHMvZGV0YWlscz9pZD1jb20uYXBwbmV4dXMub3BlbnNka2FwcIADAYgDAZADAJgDF6ADAaoDAMADrALIAwDYA_zgWeADAOgDAvgDAIAEAJIEBi91dC92MpgEAKIECjEwLjEuMTMuNTaoBACyBBAIABABGKwCIPoBKAAwADgCuAQAwAQAyAQA0gQNOTU4I05ZTTI6MzYzNdoEAggB4AQB8ARBdAz6BBIJRZJEQEpAEQAAAMDMzCpAggUXY29tTq8AHIgFAZgFAKAFUf4Y_wHABQDJBQVCFADwP9IFCQlObAAAANgFAeAFAfAFAfoFBAgAEACQBgCYBgC4BgE.&s=c60bf8485daaa47c88843086734eff52180ae5a5&referrer=play.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.appnexus.opensdkapp" + ], + "video_events": {} + } + ] + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_VideoAd.json b/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_VideoAd.json new file mode 100644 index 000000000..3eb2cac9f --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/ViewabilityStubResponse/OMID_VideoAd.json @@ -0,0 +1,46 @@ +{ + "version": "3.0.0", + "tags": [ + { + "tag_id": 16417701, + "auction_id": "5531859120537927358", + "nobid": false, + "no_ad_url": "https://nym1-ib.adnxs.com/it?an_audit=0&referrer=itunes.apple.com%2Fus%2Fapp%2Fappnexus-sdk-app%2Fid736869833&e=wqT_3QKSCXySBAAAAwDWAAUBCMP36fMFEL79q5n6kcfiTBgAKjYJAA0BABENCAQAGQkJCOA_IQkJCAAAKREJADEJCfCa4D8wpYfqBzi-B0C-B0gAUABYuaxgYABokUB4AIABAYoBAJIBA1VTRJgBAaABAagBAbABALgBA8ABAMgBAtABANgBAOABAPABAIoCWXVmKCdhJywgMjc2NzIwNywgMTU4NTA4NTM3OSk7dWYoJ2knLCAxNTUyMjgxLCAxNTg1MDg1Mzc5KTt1ZigncicsIDE3MjA1OTEyOCwgMTUZPPCfkgKhAyFYRWljcGdpcGw0TVBFUGpUaFZJWUFDQzVyR0F3QURnQVFBUkl2Z2RRcFlmcUIxZ0FZUF9fX184UGFBQndBWGdCZ0FFQmlBRUJrQUVCbUFFQm9BRUJxQUVEc0FFQXVRRXBpNGlEQUFEd1A4RUJLWXVJZ3dBQThEX0pBVGFSbXRSRm1PMF8yUUVBQUFBQUFBRHdQLUFCbWQ5ZTlRRQUUKG1BSUFvQUlBdFFJBRAAdg0ImHdBSUJ5QUlCMEFJQjJBSUI0QUlBNkFJQS1BSUFnQU1CbUFNQnFBTwXYoHVnTUpUbGxOTWpvME16WXg0QU9ISFlBRUFJZ0VBSkFFQUpnRUFjRUVBBWIBAQhESkIBBw0BCDBRUQkKJElBYVFOZ0VBUEUdLCBDSUJZa2lxUVUJJBhBRHdQN0VGDQ0UQUFBREJCDT8BAQB5FSgMQUFBTjIoAABaLigASDRBV2dqUVkumgKJASFHaENFRXc2pQEkdWF4Z0lBUW9BRBGMEER3UHpvMukAEFFJY2RTEX0MUEFfVREMDEFBQVcdDABZHQwAYR0MAGMNDKhnQnBBZUFBLtgC6AfgAsfTAeoCNGl0dW5lcy5hcHBsZS5jb20vdXMvYXBwAQTwvG5leHVzLXNkay1hcHAvaWQ3MzY4Njk4MzOAAwGIAwGQAwCYAxegAwGqAwDAA-CoAcgDANgD-aN64AMA6AMC-AMAgAQAkgQGL3V0L3YzmAQAogQLMTAuNzUuMTEuNDSoBACyBBcIABAEGMACIDIoASgCKAMoBCgFMAA4ArgEAMAEAMgEANIEDTk1OCNOWU0yOjQzNjHaBAIIAOAEAPAE-NOFUvoEEgkAAABAluRCQBEAAADAAppewIIFCTczNgmqIIgFAZgFAKAF_xEBGAHABQDJBQAFARDwP9IFCQFABQFo2AUB4AUB8AUB-gUECAAQAJAGAZgGALgGAMEGBSAsAPC_0AbWAtoGFgoQCREZAVwQABgA4AYE8gYCCACABwGIBwCgB0DIBwA.&s=571a47ebf4c02182eddc8edc156a3b1212484cbf", + "timeout_ms": 10000, + "ad_profile_id": 27079, + "rtb_video_fallback": false, + "ads": [ + { + "content_source": "rtb", + "ad_type": "video", + "notify_url": "https://nym1-ib.adnxs.com/vast_track/v2?info=ZQAAAAMArgAFAQnDe3peAAAAABG-_iqjjxzFTBnDe3peAAAAACD404VSKAAwvgc4vgdAx9FMSPP7jAJQpYfqB1gBYgItLWgBcAF4AIABAogBAJABwAKYATKgAQCoAfjThVKwAQE.&s=e16d7e8c3217476e84c0bda1789fee8d39f0313d&event_type=1", + "usersync_url": "https%3A%2F%2Facdn.adnxs.com%2Fdmp%2Fasync_usersync.html", + "buyer_member_id": 958, + "creative_id": 172059128, + "media_type_id": 4, + "media_subtype_id": 64, + "brand_category_id": 0, + "client_initiated_ad_counting": true, + "rtb": { + "video": { + "player_width": 300, + "player_height": 250, + "duration_ms": 32000, + "playback_methods": [ + "auto_play_sound_off" + ], + "frameworks": [ + "vpaid_1_0", + "vpaid_2_0", + "mraid_1", + "mraid_2", + "ormma" + ], + "content": "adnxs00:00:32" + } + } + } + ] + } + ] +} diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/AuthenticationChallengeSender.swift b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/AuthenticationChallengeSender.swift new file mode 100644 index 000000000..a15ae8ee0 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/AuthenticationChallengeSender.swift @@ -0,0 +1,35 @@ + +import Foundation +import WebKit + +@objc class AuthenticationChallengeSender : NSObject, URLAuthenticationChallengeSender { + + typealias AuthenticationChallengeHandler = (URLSession.AuthChallengeDisposition, URLCredential?) -> Void + + let handler: AuthenticationChallengeHandler + + init(handler: @escaping AuthenticationChallengeHandler) { + self.handler = handler + super.init() + } + + @objc func use(_ credential: URLCredential, for challenge: URLAuthenticationChallenge) { + handler(.useCredential, credential) + } + + @objc func continueWithoutCredential(for challenge: URLAuthenticationChallenge) { + handler(.useCredential, nil) + } + + @objc func cancel(_ challenge: URLAuthenticationChallenge) { + handler(.cancelAuthenticationChallenge, nil) + } + + @objc func performDefaultHandling(for challenge: URLAuthenticationChallenge) { + handler(.performDefaultHandling, nil) + } + + @objc func rejectProtectionSpaceAndContinue(with challenge: URLAuthenticationChallenge) { + handler(.rejectProtectionSpace, nil) + } +} diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/NSURLProtocol+WebKitSupport.swift b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/NSURLProtocol+WebKitSupport.swift new file mode 100644 index 000000000..af4ccea6c --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/NSURLProtocol+WebKitSupport.swift @@ -0,0 +1,35 @@ + + +import Foundation +import WebKit + +extension URLProtocol { + + @objc class func contextControllerClass()->AnyClass { + return NSClassFromString("WKBrowsingContextController")! + } + + @objc class func registerSchemeSelector()->Selector { + return NSSelectorFromString("registerSchemeForCustomProtocol:") + } + + @objc class func unregisterSchemeSelector()->Selector { + return NSSelectorFromString("unregisterSchemeForCustomProtocol:") + } + + @objc class func wk_register(scheme:String){ + let cls:AnyClass = contextControllerClass() + let sel = registerSchemeSelector() + if cls.responds(to: sel) { + _ = (cls as AnyObject).perform(sel, with: scheme) + } + } + + @objc class func wk_unregister(scheme:String){ + let cls:AnyClass = contextControllerClass() + let sel = unregisterSchemeSelector() + if cls.responds(to: sel) { + _ = (cls as AnyObject).perform(sel, with: scheme) + } + } +} diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.h b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.h new file mode 100755 index 000000000..352fc2098 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.h @@ -0,0 +1,24 @@ +/* Copyright 2019 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +#import + +@interface NSURLProtocol (WKWebViewSupport) + ++ (void)wk_registerScheme:(NSString *)scheme; ++ (void)wk_unregisterScheme:(NSString *)scheme; + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.m b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.m new file mode 100755 index 000000000..afaab24ae --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLProtocol+WKWebViewSupport.m @@ -0,0 +1,60 @@ +/* Copyright 2019 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +#import "NSURLProtocol+WKWebViewSupport.h" +#import + +Class WK_ContextControllerClass() { + static Class cls; + if (!cls) { + cls = [[[WKWebView new] valueForKey:@"browsingContextController"] class]; + } + return cls; +} + +SEL WK_RegisterSchemeSelector() { + return NSSelectorFromString(@"registerSchemeForCustomProtocol:"); +} + +SEL WK_UnregisterSchemeSelector() { + return NSSelectorFromString(@"unregisterSchemeForCustomProtocol:"); +} + +@implementation NSURLProtocol (WKWebViewSupport) + ++ (void)wk_registerScheme:(NSString *)scheme { + Class cls = WK_ContextControllerClass(); + SEL sel = WK_RegisterSchemeSelector(); + if ([(id)cls respondsToSelector:sel]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [(id)cls performSelector:sel withObject:scheme]; +#pragma clang diagnostic pop + } +} + ++ (void)wk_unregisterScheme:(NSString *)scheme { + Class cls = WK_ContextControllerClass(); + SEL sel = WK_UnregisterSchemeSelector(); + if ([(id)cls respondsToSelector:sel]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + [(id)cls performSelector:sel withObject:scheme]; +#pragma clang diagnostic pop + } +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.h b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.h new file mode 100644 index 000000000..de88add67 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.h @@ -0,0 +1,20 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + + +@interface NSURLSessionConfiguration (ANProtocols) + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.m b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.m new file mode 100644 index 000000000..83c6894e0 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/NSURLSessionConfiguration+ANProtocols.m @@ -0,0 +1,36 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "NSURLSessionConfiguration+ANProtocols.h" +#import "SDKValidationURLProtocol.h" + +@import ObjectiveC.runtime; + +@implementation NSURLSessionConfiguration (ANProtocols) + ++ (NSURLSessionConfiguration *)zw_defaultSessionConfiguration { + NSURLSessionConfiguration *configuration = [self zw_defaultSessionConfiguration]; + NSArray *protocolClasses = @[[SDKValidationURLProtocol class]]; + configuration.protocolClasses = protocolClasses; + return configuration; +} ++ (void)load{ + Method systemMethod = class_getClassMethod([NSURLSessionConfiguration class], @selector(defaultSessionConfiguration)); + Method zwMethod = class_getClassMethod([self class], @selector(zw_defaultSessionConfiguration)); + method_exchangeImplementations(systemMethod, zwMethod); +} + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.h b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.h new file mode 100644 index 000000000..244dddb11 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.h @@ -0,0 +1,25 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@protocol SDKValidationURLProtocolDelegate +- (void)didReceiveIABResponse:(NSString *)response; +@end + +@interface SDKValidationURLProtocol: NSURLProtocol ++ (void) setDelegate:(id)delegate; ++ (id ) delegate; +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.m b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.m new file mode 100644 index 000000000..5f295b05c --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/SDKValidationURL/SDKValidationURLProtocol.m @@ -0,0 +1,101 @@ +/* Copyright 2019 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "SDKValidationURLProtocol.h" +@interface SDKValidationURLProtocol() +@property (nonatomic, strong) NSURLConnection *connection; +@property NSMutableData *data; +@end + +@implementation SDKValidationURLProtocol +static id classDelegate = nil; + ++ (void)setDelegate:(id)delegate +{ + classDelegate = delegate; +} + ++ (id)delegate +{ + return classDelegate; +} + ++ (BOOL)canInitWithRequest:(NSURLRequest *)request +{ + if ([NSURLProtocol propertyForKey:@"AppNexusURLProtocolHandledKey" inRequest:request]) { + return NO; + } + if ([SDKValidationURLProtocol supportedPBSHost:request.URL.absoluteString]) { + if (classDelegate != nil) { + [classDelegate didReceiveIABResponse:request.URL.absoluteString]; + } + return YES; + } + return NO; +} + ++ (BOOL) supportedPBSHost:(NSString *) hostURL { + if (hostURL != nil) { + if ([hostURL containsString:@"iabtechlab.com"] || [hostURL containsString:@"appnexustracker.com"] ) { + return YES; + } + } + return NO; +} + ++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request { + return request; +} + ++ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b { + return [super requestIsCacheEquivalent:a toRequest:b]; +} + +- (void)startLoading +{ + self.data = [[NSMutableData alloc] init]; + NSMutableURLRequest *newRequest = [self.request mutableCopy]; + [NSURLProtocol setProperty:@YES forKey:@"AppNexusURLProtocolHandledKey" inRequest:newRequest]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + self.connection = [NSURLConnection connectionWithRequest:newRequest delegate:self]; +#pragma clang diagnostic pop +} + +- (void)stopLoading +{ + [self.connection cancel]; + self.connection = nil; +} + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + [self.client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [self.client URLProtocol:self didLoadData:data]; + [self.data appendData:data]; +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)connection { + [self.client URLProtocolDidFinishLoading:self]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + [self.client URLProtocol:self didFailWithError:error]; +} + + +@end diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/TrackerTest-Bridging-Header.h b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/TrackerTest-Bridging-Header.h new file mode 100644 index 000000000..46f4c846d --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/TrackerTest-Bridging-Header.h @@ -0,0 +1,15 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + diff --git a/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/WebKitURLProtocol.swift b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/WebKitURLProtocol.swift new file mode 100644 index 000000000..b66a17d55 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/WkWebViewTracking/WebKitURLProtocol.swift @@ -0,0 +1,124 @@ + + +import Foundation +import WebKit + +extension Notification.Name { + static let didReceiveURLResponse = Notification.Name("didReceiveURLResponse") +} + +@objc class WebKitURLProtocol: URLProtocol { + + static let internalKey = "com.toshiki.URLProtocolInternal" + + private lazy var session: URLSession = { [unowned self] in + return URLSession(configuration: .default, delegate: self, delegateQueue: nil) + }() + + private var response: URLResponse? + private var responseData: NSMutableData? + + open override class func canInit(with request: URLRequest) -> Bool { + return canServeRequest(request) + } + + override open class func canInit(with task: URLSessionTask) -> Bool + { + guard let request = task.currentRequest else { return false } + return canServeRequest(request) + } + + private class func canServeRequest(_ request: URLRequest) -> Bool + { + guard + URLProtocol.property(forKey: WebKitURLProtocol.internalKey, in: request) == nil, + let url = request.url, + (url.absoluteString.hasPrefix("http") || url.absoluteString.hasPrefix("https")) + else { + return false + } + return true + } + + override func startLoading() { + let mutableRequest = (request as NSURLRequest).mutableCopy() as! NSMutableURLRequest + URLProtocol.setProperty(true, forKey: WebKitURLProtocol.internalKey, in: mutableRequest) + session.dataTask(with: mutableRequest as URLRequest).resume() + + } + + override func stopLoading() { + session.getTasksWithCompletionHandler { dataTasks, _, _ in + dataTasks.forEach { $0.cancel() } + } + } + + open override class func canonicalRequest(for request: URLRequest) -> URLRequest { + return request + } +} + +extension WebKitURLProtocol: URLSessionDataDelegate { + @objc public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + responseData?.append(data) + + client?.urlProtocol(self, didLoad: data) + } + + @objc public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { + self.response = response + self.responseData = NSMutableData() + + client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: URLCache.StoragePolicy.notAllowed) + completionHandler(.allow) + } + + @objc public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { + defer { + if let error = error { + client?.urlProtocol(self, didFailWithError: error) + } else { + client?.urlProtocolDidFinishLoading(self) + } + } + + guard task.originalRequest != nil else { + return + } + + if let response = response { +// if let mime = response.mimeType, mime.contains("mpegurl") { +// let data = (responseData ?? NSMutableData()) as Data +// print(response.url!) +// print(data.count) +// } + NotificationCenter.default.post(name: .didReceiveURLResponse, object: nil, userInfo: ["response": response]) + } + + } + + @objc public func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) { + + let updatedRequest: URLRequest + if URLProtocol.property(forKey: WebKitURLProtocol.internalKey, in: request) != nil { + let mutableRequest = (request as NSURLRequest).mutableCopy() as! NSMutableURLRequest + URLProtocol.removeProperty(forKey: WebKitURLProtocol.internalKey, in: mutableRequest) + + updatedRequest = mutableRequest as URLRequest + } else { + updatedRequest = request + } + + client?.urlProtocol(self, wasRedirectedTo: updatedRequest, redirectResponse: response) + completionHandler(updatedRequest) + } + + @objc public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + let wrappedChallenge = URLAuthenticationChallenge(authenticationChallenge: challenge, sender: AuthenticationChallengeSender(handler: completionHandler)) + client?.urlProtocol(self, didReceive: wrappedChallenge) + } + + @objc public func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { + client?.urlProtocolDidFinishLoading(self) + } +} diff --git a/tests/TrackerUITest/HelpingLibrary/readme.md b/tests/TrackerUITest/HelpingLibrary/readme.md new file mode 100644 index 000000000..8670260b8 --- /dev/null +++ b/tests/TrackerUITest/HelpingLibrary/readme.md @@ -0,0 +1,14 @@ +#### ANNativeAdResponse+PrivateMethods +* To use unregisterViewFromTracking called for Native & Banner Native + + +#### ANVerificationScriptResource+ANTest.h +* To mock OMID for Banner Native,Banner Native Renderer and Native + + +#### WkWebViewTracking +Contain file used for Tracking URLs and Events + + +#### Stubbing Folder +To mock stubbing with mock response diff --git a/tests/TrackerUITest/TrackerApp.xcodeproj/project.pbxproj b/tests/TrackerUITest/TrackerApp.xcodeproj/project.pbxproj new file mode 100644 index 000000000..c3db81725 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp.xcodeproj/project.pbxproj @@ -0,0 +1,1236 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 0E49155C24065546003B7CC2 /* AdType.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49155A24065546003B7CC2 /* AdType.storyboard */; }; + 0E49157624065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49156724065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.storyboard */; }; + 0E49157724065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49156824065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.m */; }; + 0E49158C24065963003B7CC2 /* VideoAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49158024065963003B7CC2 /* VideoAdTrackerTestVC.m */; }; + 0E49158D24065963003B7CC2 /* VideoAdTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49158224065963003B7CC2 /* VideoAdTrackerTestVC.storyboard */; }; + 0E49158E24065963003B7CC2 /* BannerNativeVideoTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49158424065963003B7CC2 /* BannerNativeVideoTrackerTestVC.storyboard */; }; + 0E49158F24065963003B7CC2 /* BannerNativeVideoTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49158524065963003B7CC2 /* BannerNativeVideoTrackerTestVC.m */; }; + 0E49159024065963003B7CC2 /* NativeAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49158824065963003B7CC2 /* NativeAdTrackerTestVC.m */; }; + 0E49159124065963003B7CC2 /* ANNativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0E49158924065963003B7CC2 /* ANNativeAdView.xib */; }; + 0E49159224065963003B7CC2 /* NativeAdTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49158B24065963003B7CC2 /* NativeAdTrackerTestVC.storyboard */; }; + 0E49159524065ABF003B7CC2 /* ANNativeAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49159324065ABF003B7CC2 /* ANNativeAdView.m */; }; + 0E49159B24065E84003B7CC2 /* InterstitialAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E49159824065E84003B7CC2 /* InterstitialAdTrackerTestVC.m */; }; + 0E49159C24065E84003B7CC2 /* InterstitialAdTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E49159924065E84003B7CC2 /* InterstitialAdTrackerTestVC.storyboard */; }; + 0E877AB423FEA40700DC962F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E877AB323FEA40700DC962F /* AppDelegate.m */; }; + 0E877ABF23FEA40900DC962F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0E877ABE23FEA40900DC962F /* Assets.xcassets */; }; + 0E877AC223FEA40900DC962F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E877AC023FEA40900DC962F /* LaunchScreen.storyboard */; }; + 0E877AC523FEA40900DC962F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E877AC423FEA40900DC962F /* main.m */; }; + FC1DFE9B2590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFE972590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.m */; }; + FC1DFE9C2590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC1DFE992590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.storyboard */; }; + FC1DFEB22590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEB12590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.m */; }; + FC1DFEB92590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC1DFEB62590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.storyboard */; }; + FC1DFEBA2590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEB72590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.m */; }; + FC1DFECA2591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEC42591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.m */; }; + FC1DFECB2591229F008AE0EB /* SDKValidationURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEC72591229F008AE0EB /* SDKValidationURLProtocol.m */; }; + FC1DFECC2591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEC92591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.m */; }; + FC1F380A253D54F5006DD370 /* AdTypeTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1F3809253D54F5006DD370 /* AdTypeTableViewController.m */; }; + FC1F3813253D5799006DD370 /* RTBVideoAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F380C253D5799006DD370 /* RTBVideoAd.json */; }; + FC1F3814253D5799006DD370 /* RTBBannerNativeRendererAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F380D253D5799006DD370 /* RTBBannerNativeRendererAd.json */; }; + FC1F3815253D5799006DD370 /* RTBBannerNativeAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F380E253D5799006DD370 /* RTBBannerNativeAd.json */; }; + FC1F3816253D5799006DD370 /* RTBNativeAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F380F253D5799006DD370 /* RTBNativeAd.json */; }; + FC1F3817253D5799006DD370 /* RTBBannerVideoAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F3810253D5799006DD370 /* RTBBannerVideoAd.json */; }; + FC1F3818253D5799006DD370 /* RTBBannerAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F3811253D5799006DD370 /* RTBBannerAd.json */; }; + FC1F3819253D5799006DD370 /* RTBInterstitialAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC1F3812253D5799006DD370 /* RTBInterstitialAd.json */; }; + FC77572C25374EB400400FE7 /* AppNexusSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC77572225374E7000400FE7 /* AppNexusSDK.framework */; }; + FC77572D25374EB400400FE7 /* AppNexusSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FC77572225374E7000400FE7 /* AppNexusSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + FC77575D25374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573325374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.m */; }; + FC77575E25374EFB00400FE7 /* ANStubManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573525374EFB00400FE7 /* ANStubManager.m */; }; + FC77575F25374EFB00400FE7 /* ANGlobal+ANTest.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573725374EFB00400FE7 /* ANGlobal+ANTest.m */; }; + FC77576025374EFB00400FE7 /* ANHTTPStubbingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573925374EFB00400FE7 /* ANHTTPStubbingManager.m */; }; + FC77576125374EFB00400FE7 /* ANHTTPCookieStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573B25374EFB00400FE7 /* ANHTTPCookieStorage.m */; }; + FC77576225374EFB00400FE7 /* ANURLConnectionStub.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77573E25374EFB00400FE7 /* ANURLConnectionStub.m */; }; + FC77576325374EFB00400FE7 /* ANHTTPStubURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77574025374EFB00400FE7 /* ANHTTPStubURLProtocol.m */; }; + FC77576425374EFB00400FE7 /* NSObject+Swizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77574125374EFB00400FE7 /* NSObject+Swizzling.m */; }; + FC77576525374EFB00400FE7 /* ANURLConnectionStub+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = FC77574325374EFB00400FE7 /* ANURLConnectionStub+NSURLSessionConfiguration.m */; }; + FC7BCF3A2588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC7BCF372588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.m */; }; + FC7BCF3B2588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC7BCF392588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.storyboard */; }; + FC7BCF40258905DB00739FC1 /* OMID_BannerAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC7BCF3F258905DB00739FC1 /* OMID_BannerAd.json */; }; + FC7BCF5A258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC7BCF57258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.m */; }; + FC7BCF5B258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC7BCF59258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.storyboard */; }; + FC7BCF66258BC31300739FC1 /* OMID_VideoAd.json in Resources */ = {isa = PBXBuildFile; fileRef = FC7BCF65258BC31300739FC1 /* OMID_VideoAd.json */; }; + FC85ACF8258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC85ACF5258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.m */; }; + FC85ACF9258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC85ACF7258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.storyboard */; }; + FC8FE6E525483AE000971E2A /* UnifiedNativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC8FE6E225483AE000971E2A /* UnifiedNativeAdView.xib */; }; + FCB2469F2539B4FB00600B3D /* NSURLProtocol+WebKitSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB2469B2539B4FB00600B3D /* NSURLProtocol+WebKitSupport.swift */; }; + FCB246A02539B4FB00600B3D /* WebKitURLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB2469C2539B4FB00600B3D /* WebKitURLProtocol.swift */; }; + FCB246A12539B4FB00600B3D /* AuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCB2469D2539B4FB00600B3D /* AuthenticationChallengeSender.swift */; }; + FCCB89C725AE352D0029E24E /* readme.md in Resources */ = {isa = PBXBuildFile; fileRef = FCCB89C625AE352D0029E24E /* readme.md */; }; + FCDE87B325F28CA300E9B117 /* ContentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FCDE87AC25F28CA300E9B117 /* ContentCell.m */; }; + FCDE87B425F28CA300E9B117 /* ScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCDE87AD25F28CA300E9B117 /* ScrollViewController.m */; }; + FCDE87B525F28CA300E9B117 /* BannerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FCDE87AE25F28CA300E9B117 /* BannerCell.m */; }; + FCDE87B625F28CA300E9B117 /* ScrollViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FCDE87AF25F28CA300E9B117 /* ScrollViewController.storyboard */; }; + FCDE87BA25F2933300E9B117 /* BannerAdOnePXScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FCDE87B925F2933300E9B117 /* BannerAdOnePXScrollViewController.m */; }; + FCE7E8CC2593C9E300801E27 /* InterstitialViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEA92590DC8F008AE0EB /* InterstitialViewabilityTrackerTests.m */; }; + FCE7E8CD2593C9E300801E27 /* BannerViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC7BCF212588ED3400739FC1 /* BannerViewabilityTrackerTests.m */; }; + FCE7E8CE2593C9E300801E27 /* BannerNativeViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEEA25922617008AE0EB /* BannerNativeViewabilityTrackerTests.m */; }; + FCE7E8CF2593C9E300801E27 /* NativeViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1DFEF025922D79008AE0EB /* NativeViewabilityTrackerTests.m */; }; + FCE7E8D02593C9E300801E27 /* VideoViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC85ACEE258D198900A64F7D /* VideoViewabilityTrackerTests.m */; }; + FCE7E8D12593C9E300801E27 /* BannerVideoViewabilityTrackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC85ACE7258D0C5200A64F7D /* BannerVideoViewabilityTrackerTests.m */; }; + FCE7E8DA2593C9ED00801E27 /* BannerAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC75568B253DAFE000C2C518 /* BannerAdTrackerTestVC.m */; }; + FCE7E8DB2593C9ED00801E27 /* BannerNativeRendererAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC75567B253D78EF00C2C518 /* BannerNativeRendererAdTrackerTestVC.m */; }; + FCE7E8DC2593C9ED00801E27 /* MARBannerNativeRendererAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FCFA5D432541841300240D74 /* MARBannerNativeRendererAdTrackerTestVC.m */; }; + FCE7E8DD2593C9ED00801E27 /* MARNativeAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FCFA5D3E2541759A00240D74 /* MARNativeAdTrackerTestVC.m */; }; + FCE7E8DE2593C9ED00801E27 /* NativeAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC755685253D9E8D00C2C518 /* NativeAdTrackerTestVC.m */; }; + FCE7E8E02593C9ED00801E27 /* BannerNativeAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC755680253D960B00C2C518 /* BannerNativeAdTrackerTestVC.m */; }; + FCE7E8E12593C9ED00801E27 /* BannerVideoAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC755691253EC4BC00C2C518 /* BannerVideoAdTrackerTestVC.m */; }; + FCE7E8E32593C9ED00801E27 /* InterstitialAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC75568E253DC80C00C2C518 /* InterstitialAdTrackerTestVC.m */; }; + FCE7E8E42593C9ED00801E27 /* VideoAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC755695253EC6B800C2C518 /* VideoAdTrackerTestVC.m */; }; + FCE7E8E62593C9ED00801E27 /* MARBannerAdTrackerTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FC1C6D14253F787E00781272 /* MARBannerAdTrackerTestVC.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + FC75564E253D773A00C2C518 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 8A9AED8B1A1BE84F00C58BDA; + remoteInfo = AppNexusSDK; + }; + FC77572125374E7000400FE7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8A9AED8C1A1BE84F00C58BDA; + remoteInfo = AppNexusSDK; + }; + FC77572325374E7000400FE7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = F5731AFD228B43570012B134; + remoteInfo = AppNexusNativeSDK; + }; + FCE7E8B22593C9C100801E27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0E877AA723FEA40700DC962F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0E877AAE23FEA40700DC962F; + remoteInfo = TrackerApp; + }; + FCE7E8C32593C9D700801E27 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0E877AA723FEA40700DC962F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0E877AAE23FEA40700DC962F; + remoteInfo = TrackerApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0EE0578423FED62F00D61405 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + FC77572D25374EB400400FE7 /* AppNexusSDK.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0E49155B24065546003B7CC2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/AdType.storyboard; sourceTree = ""; }; + 0E49156624065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MARBannerNativeRendererAdTrackerTestVC.h; sourceTree = ""; }; + 0E49156724065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MARBannerNativeRendererAdTrackerTestVC.storyboard; sourceTree = ""; }; + 0E49156824065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MARBannerNativeRendererAdTrackerTestVC.m; sourceTree = ""; }; + 0E49158024065963003B7CC2 /* VideoAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoAdTrackerTestVC.m; sourceTree = ""; }; + 0E49158124065963003B7CC2 /* VideoAdTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoAdTrackerTestVC.h; sourceTree = ""; }; + 0E49158224065963003B7CC2 /* VideoAdTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = VideoAdTrackerTestVC.storyboard; sourceTree = ""; }; + 0E49158424065963003B7CC2 /* BannerNativeVideoTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BannerNativeVideoTrackerTestVC.storyboard; sourceTree = ""; }; + 0E49158524065963003B7CC2 /* BannerNativeVideoTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerNativeVideoTrackerTestVC.m; sourceTree = ""; }; + 0E49158624065963003B7CC2 /* BannerNativeVideoTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerNativeVideoTrackerTestVC.h; sourceTree = ""; }; + 0E49158824065963003B7CC2 /* NativeAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeAdTrackerTestVC.m; sourceTree = ""; }; + 0E49158924065963003B7CC2 /* ANNativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ANNativeAdView.xib; sourceTree = ""; }; + 0E49158A24065963003B7CC2 /* NativeAdTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeAdTrackerTestVC.h; sourceTree = ""; }; + 0E49158B24065963003B7CC2 /* NativeAdTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NativeAdTrackerTestVC.storyboard; sourceTree = ""; }; + 0E49159324065ABF003B7CC2 /* ANNativeAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANNativeAdView.m; sourceTree = ""; }; + 0E49159424065ABF003B7CC2 /* ANNativeAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANNativeAdView.h; sourceTree = ""; }; + 0E49159824065E84003B7CC2 /* InterstitialAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InterstitialAdTrackerTestVC.m; sourceTree = ""; }; + 0E49159924065E84003B7CC2 /* InterstitialAdTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = InterstitialAdTrackerTestVC.storyboard; sourceTree = ""; }; + 0E49159A24065E84003B7CC2 /* InterstitialAdTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterstitialAdTrackerTestVC.h; sourceTree = ""; }; + 0E877AAF23FEA40700DC962F /* TrackerApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TrackerApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E877AB223FEA40700DC962F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 0E877AB323FEA40700DC962F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 0E877ABE23FEA40900DC962F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0E877AC123FEA40900DC962F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0E877AC323FEA40900DC962F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0E877AC423FEA40900DC962F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + FC1C6D14253F787E00781272 /* MARBannerAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MARBannerAdTrackerTestVC.m; sourceTree = ""; }; + FC1DFE972590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InterstitialAdViewabilityTrackerTestVC.m; sourceTree = ""; }; + FC1DFE982590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterstitialAdViewabilityTrackerTestVC.h; sourceTree = ""; }; + FC1DFE992590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = InterstitialAdViewabilityTrackerTestVC.storyboard; sourceTree = ""; }; + FC1DFEA92590DC8F008AE0EB /* InterstitialViewabilityTrackerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InterstitialViewabilityTrackerTests.m; sourceTree = ""; }; + FC1DFEB02590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ANVerificationScriptResource+ANTest.h"; sourceTree = ""; }; + FC1DFEB12590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ANVerificationScriptResource+ANTest.m"; sourceTree = ""; }; + FC1DFEB62590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BannerNativeAdViewabilityTrackerTestVC.storyboard; sourceTree = ""; }; + FC1DFEB72590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerNativeAdViewabilityTrackerTestVC.m; sourceTree = ""; }; + FC1DFEB82590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerNativeAdViewabilityTrackerTestVC.h; sourceTree = ""; }; + FC1DFEC42591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLProtocol+WKWebViewSupport.m"; sourceTree = ""; }; + FC1DFEC52591229F008AE0EB /* SDKValidationURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDKValidationURLProtocol.h; sourceTree = ""; }; + FC1DFEC62591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLSessionConfiguration+ANProtocols.h"; sourceTree = ""; }; + FC1DFEC72591229F008AE0EB /* SDKValidationURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDKValidationURLProtocol.m; sourceTree = ""; }; + FC1DFEC82591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLProtocol+WKWebViewSupport.h"; sourceTree = ""; }; + FC1DFEC92591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLSessionConfiguration+ANProtocols.m"; sourceTree = ""; }; + FC1DFEDB25912AD7008AE0EB /* ANNativeAdResponse+PrivateMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ANNativeAdResponse+PrivateMethods.h"; sourceTree = ""; }; + FC1DFEEA25922617008AE0EB /* BannerNativeViewabilityTrackerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerNativeViewabilityTrackerTests.m; sourceTree = ""; }; + FC1DFEF025922D79008AE0EB /* NativeViewabilityTrackerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeViewabilityTrackerTests.m; sourceTree = ""; }; + FC1F3808253D54F5006DD370 /* AdTypeTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdTypeTableViewController.h; sourceTree = ""; }; + FC1F3809253D54F5006DD370 /* AdTypeTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AdTypeTableViewController.m; sourceTree = ""; }; + FC1F380C253D5799006DD370 /* RTBVideoAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBVideoAd.json; sourceTree = ""; }; + FC1F380D253D5799006DD370 /* RTBBannerNativeRendererAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBBannerNativeRendererAd.json; sourceTree = ""; }; + FC1F380E253D5799006DD370 /* RTBBannerNativeAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBBannerNativeAd.json; sourceTree = ""; }; + FC1F380F253D5799006DD370 /* RTBNativeAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBNativeAd.json; sourceTree = ""; }; + FC1F3810253D5799006DD370 /* RTBBannerVideoAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBBannerVideoAd.json; sourceTree = ""; }; + FC1F3811253D5799006DD370 /* RTBBannerAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBBannerAd.json; sourceTree = ""; }; + FC1F3812253D5799006DD370 /* RTBInterstitialAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = RTBInterstitialAd.json; sourceTree = ""; }; + FC75567B253D78EF00C2C518 /* BannerNativeRendererAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerNativeRendererAdTrackerTestVC.m; sourceTree = ""; }; + FC755680253D960B00C2C518 /* BannerNativeAdTrackerTestVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BannerNativeAdTrackerTestVC.m; sourceTree = ""; }; + FC755685253D9E8D00C2C518 /* NativeAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeAdTrackerTestVC.m; sourceTree = ""; }; + FC75568B253DAFE000C2C518 /* BannerAdTrackerTestVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BannerAdTrackerTestVC.m; sourceTree = ""; }; + FC75568E253DC80C00C2C518 /* InterstitialAdTrackerTestVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterstitialAdTrackerTestVC.m; sourceTree = ""; }; + FC755691253EC4BC00C2C518 /* BannerVideoAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerVideoAdTrackerTestVC.m; sourceTree = ""; }; + FC755695253EC6B800C2C518 /* VideoAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoAdTrackerTestVC.m; sourceTree = ""; }; + FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AppNexusSDK.xcodeproj; path = ../../sdk/AppNexusSDK.xcodeproj; sourceTree = ""; }; + FC77573325374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; + FC77573425374EFB00400FE7 /* ANHTTPNetworkSession+ANTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ANHTTPNetworkSession+ANTest.h"; sourceTree = ""; }; + FC77573525374EFB00400FE7 /* ANStubManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANStubManager.m; sourceTree = ""; }; + FC77573625374EFB00400FE7 /* ANURLConnectionStub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANURLConnectionStub.h; sourceTree = ""; }; + FC77573725374EFB00400FE7 /* ANGlobal+ANTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ANGlobal+ANTest.m"; sourceTree = ""; }; + FC77573825374EFB00400FE7 /* ANHTTPStubURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANHTTPStubURLProtocol.h; sourceTree = ""; }; + FC77573925374EFB00400FE7 /* ANHTTPStubbingManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANHTTPStubbingManager.m; sourceTree = ""; }; + FC77573A25374EFB00400FE7 /* NSObject+Swizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Swizzling.h"; sourceTree = ""; }; + FC77573B25374EFB00400FE7 /* ANHTTPCookieStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANHTTPCookieStorage.m; sourceTree = ""; }; + FC77573C25374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; + FC77573D25374EFB00400FE7 /* ANGlobal+ANTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ANGlobal+ANTest.h"; sourceTree = ""; }; + FC77573E25374EFB00400FE7 /* ANURLConnectionStub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANURLConnectionStub.m; sourceTree = ""; }; + FC77573F25374EFB00400FE7 /* ANStubManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANStubManager.h; sourceTree = ""; }; + FC77574025374EFB00400FE7 /* ANHTTPStubURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANHTTPStubURLProtocol.m; sourceTree = ""; }; + FC77574125374EFB00400FE7 /* NSObject+Swizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Swizzling.m"; sourceTree = ""; }; + FC77574225374EFB00400FE7 /* ANHTTPCookieStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANHTTPCookieStorage.h; sourceTree = ""; }; + FC77574325374EFB00400FE7 /* ANURLConnectionStub+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ANURLConnectionStub+NSURLSessionConfiguration.m"; sourceTree = ""; }; + FC77574425374EFB00400FE7 /* ANHTTPStubbingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANHTTPStubbingManager.h; sourceTree = ""; }; + FC7BCF212588ED3400739FC1 /* BannerViewabilityTrackerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BannerViewabilityTrackerTests.m; sourceTree = ""; }; + FC7BCF372588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerAdViewabilityTrackerTestVC.m; sourceTree = ""; }; + FC7BCF382588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerAdViewabilityTrackerTestVC.h; sourceTree = ""; }; + FC7BCF392588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BannerAdViewabilityTrackerTestVC.storyboard; sourceTree = ""; }; + FC7BCF3F258905DB00739FC1 /* OMID_BannerAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = OMID_BannerAd.json; sourceTree = ""; }; + FC7BCF57258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerVideoAdViewabilityTrackerTestVC.m; sourceTree = ""; }; + FC7BCF58258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerVideoAdViewabilityTrackerTestVC.h; sourceTree = ""; }; + FC7BCF59258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BannerVideoAdViewabilityTrackerTestVC.storyboard; sourceTree = ""; }; + FC7BCF65258BC31300739FC1 /* OMID_VideoAd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = OMID_VideoAd.json; sourceTree = ""; }; + FC85ACE7258D0C5200A64F7D /* BannerVideoViewabilityTrackerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerVideoViewabilityTrackerTests.m; sourceTree = ""; }; + FC85ACEE258D198900A64F7D /* VideoViewabilityTrackerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoViewabilityTrackerTests.m; sourceTree = ""; }; + FC85ACF5258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoAdViewabilityTrackerTestVC.m; sourceTree = ""; }; + FC85ACF6258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoAdViewabilityTrackerTestVC.h; sourceTree = ""; }; + FC85ACF7258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = VideoAdViewabilityTrackerTestVC.storyboard; sourceTree = ""; }; + FC8FE6E225483AE000971E2A /* UnifiedNativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = UnifiedNativeAdView.xib; path = Admob/UnifiedNativeAdView.xib; sourceTree = ""; }; + FCB2469B2539B4FB00600B3D /* NSURLProtocol+WebKitSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSURLProtocol+WebKitSupport.swift"; sourceTree = ""; }; + FCB2469C2539B4FB00600B3D /* WebKitURLProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebKitURLProtocol.swift; sourceTree = ""; }; + FCB2469D2539B4FB00600B3D /* AuthenticationChallengeSender.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationChallengeSender.swift; sourceTree = ""; }; + FCB2469E2539B4FB00600B3D /* TrackerTest-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TrackerTest-Bridging-Header.h"; sourceTree = ""; }; + FCCB89C625AE352D0029E24E /* readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = readme.md; sourceTree = ""; }; + FCDE87AC25F28CA300E9B117 /* ContentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentCell.m; sourceTree = ""; }; + FCDE87AD25F28CA300E9B117 /* ScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScrollViewController.m; sourceTree = ""; }; + FCDE87AE25F28CA300E9B117 /* BannerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerCell.m; sourceTree = ""; }; + FCDE87AF25F28CA300E9B117 /* ScrollViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ScrollViewController.storyboard; sourceTree = ""; }; + FCDE87B025F28CA300E9B117 /* ContentCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentCell.h; sourceTree = ""; }; + FCDE87B125F28CA300E9B117 /* ScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewController.h; sourceTree = ""; }; + FCDE87B225F28CA300E9B117 /* BannerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerCell.h; sourceTree = ""; }; + FCDE87B925F2933300E9B117 /* BannerAdOnePXScrollViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BannerAdOnePXScrollViewController.m; sourceTree = ""; }; + FCE7E8AD2593C9C100801E27 /* ViewabilityTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ViewabilityTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + FCE7E8B12593C9C100801E27 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + FCE7E8BE2593C9D700801E27 /* TrackerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TrackerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + FCE7E8C22593C9D700801E27 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + FCE7E9012593CC7700801E27 /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; + FCFA5D3E2541759A00240D74 /* MARNativeAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MARNativeAdTrackerTestVC.m; sourceTree = ""; }; + FCFA5D432541841300240D74 /* MARBannerNativeRendererAdTrackerTestVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MARBannerNativeRendererAdTrackerTestVC.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0E877AAC23FEA40700DC962F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FC77572C25374EB400400FE7 /* AppNexusSDK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8AA2593C9C100801E27 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8BB2593C9D700801E27 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0E491560240657CC003B7CC2 /* supporting file */ = { + isa = PBXGroup; + children = ( + 0E877AB223FEA40700DC962F /* AppDelegate.h */, + 0E877AB323FEA40700DC962F /* AppDelegate.m */, + 0E877AC323FEA40900DC962F /* Info.plist */, + 0E877AC023FEA40900DC962F /* LaunchScreen.storyboard */, + 0E877AC423FEA40900DC962F /* main.m */, + ); + name = "supporting file"; + path = ..; + sourceTree = ""; + }; + 0E49156524065911003B7CC2 /* MultiAdRequest */ = { + isa = PBXGroup; + children = ( + 0E49156724065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.storyboard */, + 0E49156624065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.h */, + 0E49156824065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.m */, + ); + path = MultiAdRequest; + sourceTree = ""; + }; + 0E49157F24065963003B7CC2 /* VideoAd */ = { + isa = PBXGroup; + children = ( + 0E49158224065963003B7CC2 /* VideoAdTrackerTestVC.storyboard */, + 0E49158124065963003B7CC2 /* VideoAdTrackerTestVC.h */, + 0E49158024065963003B7CC2 /* VideoAdTrackerTestVC.m */, + ); + path = VideoAd; + sourceTree = ""; + }; + 0E49158324065963003B7CC2 /* BannerAd */ = { + isa = PBXGroup; + children = ( + 0E49158424065963003B7CC2 /* BannerNativeVideoTrackerTestVC.storyboard */, + 0E49158624065963003B7CC2 /* BannerNativeVideoTrackerTestVC.h */, + 0E49158524065963003B7CC2 /* BannerNativeVideoTrackerTestVC.m */, + ); + path = BannerAd; + sourceTree = ""; + }; + 0E49158724065963003B7CC2 /* NativeAd */ = { + isa = PBXGroup; + children = ( + 0E49159424065ABF003B7CC2 /* ANNativeAdView.h */, + FC8FE6E225483AE000971E2A /* UnifiedNativeAdView.xib */, + 0E49159324065ABF003B7CC2 /* ANNativeAdView.m */, + 0E49158924065963003B7CC2 /* ANNativeAdView.xib */, + 0E49158B24065963003B7CC2 /* NativeAdTrackerTestVC.storyboard */, + 0E49158A24065963003B7CC2 /* NativeAdTrackerTestVC.h */, + 0E49158824065963003B7CC2 /* NativeAdTrackerTestVC.m */, + ); + path = NativeAd; + sourceTree = ""; + }; + 0E49159724065E84003B7CC2 /* InterstitialAd */ = { + isa = PBXGroup; + children = ( + 0E49159924065E84003B7CC2 /* InterstitialAdTrackerTestVC.storyboard */, + 0E49159A24065E84003B7CC2 /* InterstitialAdTrackerTestVC.h */, + 0E49159824065E84003B7CC2 /* InterstitialAdTrackerTestVC.m */, + ); + path = InterstitialAd; + sourceTree = ""; + }; + 0E877AA623FEA40700DC962F = { + isa = PBXGroup; + children = ( + FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */, + 0E877AB123FEA40700DC962F /* TrackerApp */, + FCE7E8AE2593C9C100801E27 /* ViewabilityTests */, + FCE7E8BF2593C9D700801E27 /* TrackerTests */, + 0EE0577F23FED62F00D61405 /* Frameworks */, + 0E877AB023FEA40700DC962F /* Products */, + ); + sourceTree = ""; + }; + 0E877AB023FEA40700DC962F /* Products */ = { + isa = PBXGroup; + children = ( + 0E877AAF23FEA40700DC962F /* TrackerApp.app */, + FCE7E8AD2593C9C100801E27 /* ViewabilityTests.xctest */, + FCE7E8BE2593C9D700801E27 /* TrackerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 0E877AB123FEA40700DC962F /* TrackerApp */ = { + isa = PBXGroup; + children = ( + FCE7E9012593CC7700801E27 /* Constant.h */, + 0E49155A24065546003B7CC2 /* AdType.storyboard */, + FC1F3808253D54F5006DD370 /* AdTypeTableViewController.h */, + FC1F3809253D54F5006DD370 /* AdTypeTableViewController.m */, + FC77572F25374EFB00400FE7 /* HelpingLibrary */, + FC7BCF2D2588F5FA00739FC1 /* ImpressionTracker */, + FC7BCF302588F7B300739FC1 /* ViewabilityTrackerUITests */, + 0E877ABE23FEA40900DC962F /* Assets.xcassets */, + ); + path = TrackerApp; + sourceTree = ""; + }; + 0EE0577F23FED62F00D61405 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + FC1DFE962590DA62008AE0EB /* ViewabilityInterstitialAd */ = { + isa = PBXGroup; + children = ( + FC1DFE982590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.h */, + FC1DFE972590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.m */, + FC1DFE992590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.storyboard */, + ); + path = ViewabilityInterstitialAd; + sourceTree = ""; + }; + FC1DFEAF2590E7EF008AE0EB /* Categories */ = { + isa = PBXGroup; + children = ( + FC1DFEDB25912AD7008AE0EB /* ANNativeAdResponse+PrivateMethods.h */, + FC1DFEB02590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.h */, + FC1DFEB12590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.m */, + ); + path = Categories; + sourceTree = ""; + }; + FC1DFEB52590E8C7008AE0EB /* ViewabilityBannerNativeAd */ = { + isa = PBXGroup; + children = ( + FC1DFEB62590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.storyboard */, + FC1DFEB82590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.h */, + FC1DFEB72590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.m */, + ); + path = ViewabilityBannerNativeAd; + sourceTree = ""; + }; + FC1DFEC32591229F008AE0EB /* SDKValidationURL */ = { + isa = PBXGroup; + children = ( + FC1DFEC42591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.m */, + FC1DFEC52591229F008AE0EB /* SDKValidationURLProtocol.h */, + FC1DFEC62591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.h */, + FC1DFEC72591229F008AE0EB /* SDKValidationURLProtocol.m */, + FC1DFEC82591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.h */, + FC1DFEC92591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.m */, + ); + path = SDKValidationURL; + sourceTree = ""; + }; + FC77571D25374E7000400FE7 /* Products */ = { + isa = PBXGroup; + children = ( + FC77572225374E7000400FE7 /* AppNexusSDK.framework */, + FC77572425374E7000400FE7 /* AppNexusNativeSDK.framework */, + ); + name = Products; + sourceTree = ""; + }; + FC77572F25374EFB00400FE7 /* HelpingLibrary */ = { + isa = PBXGroup; + children = ( + FC1DFEAF2590E7EF008AE0EB /* Categories */, + FC7BCF3E258905DB00739FC1 /* ViewabilityStubResponse */, + FCB2469A2539B4FB00600B3D /* WkWebViewTracking */, + FC77573025374EFB00400FE7 /* StubResponse */, + FC77573225374EFB00400FE7 /* Stubbing */, + FCCB89C625AE352D0029E24E /* readme.md */, + ); + path = HelpingLibrary; + sourceTree = SOURCE_ROOT; + }; + FC77573025374EFB00400FE7 /* StubResponse */ = { + isa = PBXGroup; + children = ( + FC1F3811253D5799006DD370 /* RTBBannerAd.json */, + FC1F380E253D5799006DD370 /* RTBBannerNativeAd.json */, + FC1F380D253D5799006DD370 /* RTBBannerNativeRendererAd.json */, + FC1F3810253D5799006DD370 /* RTBBannerVideoAd.json */, + FC1F3812253D5799006DD370 /* RTBInterstitialAd.json */, + FC1F380F253D5799006DD370 /* RTBNativeAd.json */, + FC1F380C253D5799006DD370 /* RTBVideoAd.json */, + ); + path = StubResponse; + sourceTree = ""; + }; + FC77573225374EFB00400FE7 /* Stubbing */ = { + isa = PBXGroup; + children = ( + FC77573325374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.m */, + FC77573425374EFB00400FE7 /* ANHTTPNetworkSession+ANTest.h */, + FC77573625374EFB00400FE7 /* ANURLConnectionStub.h */, + FC77573725374EFB00400FE7 /* ANGlobal+ANTest.m */, + FC77573825374EFB00400FE7 /* ANHTTPStubURLProtocol.h */, + FC77573925374EFB00400FE7 /* ANHTTPStubbingManager.m */, + FC77573A25374EFB00400FE7 /* NSObject+Swizzling.h */, + FC77573B25374EFB00400FE7 /* ANHTTPCookieStorage.m */, + FC77573C25374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.h */, + FC77573D25374EFB00400FE7 /* ANGlobal+ANTest.h */, + FC77573E25374EFB00400FE7 /* ANURLConnectionStub.m */, + FC77574025374EFB00400FE7 /* ANHTTPStubURLProtocol.m */, + FC77574125374EFB00400FE7 /* NSObject+Swizzling.m */, + FC77574225374EFB00400FE7 /* ANHTTPCookieStorage.h */, + FC77574325374EFB00400FE7 /* ANURLConnectionStub+NSURLSessionConfiguration.m */, + FC77574425374EFB00400FE7 /* ANHTTPStubbingManager.h */, + FC77573F25374EFB00400FE7 /* ANStubManager.h */, + FC77573525374EFB00400FE7 /* ANStubManager.m */, + ); + path = Stubbing; + sourceTree = ""; + }; + FC7BCF2D2588F5FA00739FC1 /* ImpressionTracker */ = { + isa = PBXGroup; + children = ( + FCDE87AB25F28CA300E9B117 /* ScrollView */, + 0E49158324065963003B7CC2 /* BannerAd */, + 0E49159724065E84003B7CC2 /* InterstitialAd */, + 0E49156524065911003B7CC2 /* MultiAdRequest */, + 0E49158724065963003B7CC2 /* NativeAd */, + 0E491560240657CC003B7CC2 /* supporting file */, + 0E49157F24065963003B7CC2 /* VideoAd */, + ); + path = ImpressionTracker; + sourceTree = ""; + }; + FC7BCF302588F7B300739FC1 /* ViewabilityTrackerUITests */ = { + isa = PBXGroup; + children = ( + FC1DFEB52590E8C7008AE0EB /* ViewabilityBannerNativeAd */, + FC1DFE962590DA62008AE0EB /* ViewabilityInterstitialAd */, + FC85ACF4258D19C100A64F7D /* ViewabilityVideoAd */, + FC7BCF56258B9F8700739FC1 /* ViewabilityBannerVideoAd */, + FC7BCF362588FC4E00739FC1 /* ViewabilityBannerAd */, + ); + path = ViewabilityTrackerUITests; + sourceTree = ""; + }; + FC7BCF362588FC4E00739FC1 /* ViewabilityBannerAd */ = { + isa = PBXGroup; + children = ( + FC7BCF382588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.h */, + FC7BCF372588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.m */, + FC7BCF392588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.storyboard */, + ); + path = ViewabilityBannerAd; + sourceTree = ""; + }; + FC7BCF3E258905DB00739FC1 /* ViewabilityStubResponse */ = { + isa = PBXGroup; + children = ( + FC7BCF3F258905DB00739FC1 /* OMID_BannerAd.json */, + FC7BCF65258BC31300739FC1 /* OMID_VideoAd.json */, + ); + path = ViewabilityStubResponse; + sourceTree = ""; + }; + FC7BCF56258B9F8700739FC1 /* ViewabilityBannerVideoAd */ = { + isa = PBXGroup; + children = ( + FC7BCF58258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.h */, + FC7BCF57258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.m */, + FC7BCF59258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.storyboard */, + ); + path = ViewabilityBannerVideoAd; + sourceTree = ""; + }; + FC85ACF4258D19C100A64F7D /* ViewabilityVideoAd */ = { + isa = PBXGroup; + children = ( + FC85ACF6258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.h */, + FC85ACF5258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.m */, + FC85ACF7258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.storyboard */, + ); + path = ViewabilityVideoAd; + sourceTree = ""; + }; + FCB2469A2539B4FB00600B3D /* WkWebViewTracking */ = { + isa = PBXGroup; + children = ( + FC1DFEC32591229F008AE0EB /* SDKValidationURL */, + FCB2469B2539B4FB00600B3D /* NSURLProtocol+WebKitSupport.swift */, + FCB2469C2539B4FB00600B3D /* WebKitURLProtocol.swift */, + FCB2469D2539B4FB00600B3D /* AuthenticationChallengeSender.swift */, + FCB2469E2539B4FB00600B3D /* TrackerTest-Bridging-Header.h */, + ); + path = WkWebViewTracking; + sourceTree = ""; + }; + FCDE87AB25F28CA300E9B117 /* ScrollView */ = { + isa = PBXGroup; + children = ( + FCDE87AC25F28CA300E9B117 /* ContentCell.m */, + FCDE87AD25F28CA300E9B117 /* ScrollViewController.m */, + FCDE87AE25F28CA300E9B117 /* BannerCell.m */, + FCDE87AF25F28CA300E9B117 /* ScrollViewController.storyboard */, + FCDE87B025F28CA300E9B117 /* ContentCell.h */, + FCDE87B125F28CA300E9B117 /* ScrollViewController.h */, + FCDE87B225F28CA300E9B117 /* BannerCell.h */, + ); + path = ScrollView; + sourceTree = ""; + }; + FCE7E8AE2593C9C100801E27 /* ViewabilityTests */ = { + isa = PBXGroup; + children = ( + FC1DFEA92590DC8F008AE0EB /* InterstitialViewabilityTrackerTests.m */, + FC85ACE7258D0C5200A64F7D /* BannerVideoViewabilityTrackerTests.m */, + FC85ACEE258D198900A64F7D /* VideoViewabilityTrackerTests.m */, + FC7BCF212588ED3400739FC1 /* BannerViewabilityTrackerTests.m */, + FC1DFEEA25922617008AE0EB /* BannerNativeViewabilityTrackerTests.m */, + FC1DFEF025922D79008AE0EB /* NativeViewabilityTrackerTests.m */, + FCE7E8B12593C9C100801E27 /* Info.plist */, + ); + path = ViewabilityTests; + sourceTree = ""; + }; + FCE7E8BF2593C9D700801E27 /* TrackerTests */ = { + isa = PBXGroup; + children = ( + FC75567B253D78EF00C2C518 /* BannerNativeRendererAdTrackerTestVC.m */, + FC75568E253DC80C00C2C518 /* InterstitialAdTrackerTestVC.m */, + FC755680253D960B00C2C518 /* BannerNativeAdTrackerTestVC.m */, + FC755685253D9E8D00C2C518 /* NativeAdTrackerTestVC.m */, + FC75568B253DAFE000C2C518 /* BannerAdTrackerTestVC.m */, + FC755691253EC4BC00C2C518 /* BannerVideoAdTrackerTestVC.m */, + FC755695253EC6B800C2C518 /* VideoAdTrackerTestVC.m */, + FC1C6D14253F787E00781272 /* MARBannerAdTrackerTestVC.m */, + FCFA5D3E2541759A00240D74 /* MARNativeAdTrackerTestVC.m */, + FCFA5D432541841300240D74 /* MARBannerNativeRendererAdTrackerTestVC.m */, + FCE7E8C22593C9D700801E27 /* Info.plist */, + FCDE87B925F2933300E9B117 /* BannerAdOnePXScrollViewController.m */, + ); + path = TrackerTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0E877AAE23FEA40700DC962F /* TrackerApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0E877AC823FEA40900DC962F /* Build configuration list for PBXNativeTarget "TrackerApp" */; + buildPhases = ( + 0E877AAB23FEA40700DC962F /* Sources */, + 0E877AAC23FEA40700DC962F /* Frameworks */, + 0E877AAD23FEA40700DC962F /* Resources */, + 0EE0578423FED62F00D61405 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + FC75564F253D773A00C2C518 /* PBXTargetDependency */, + ); + name = TrackerApp; + productName = SimpleMultiAd; + productReference = 0E877AAF23FEA40700DC962F /* TrackerApp.app */; + productType = "com.apple.product-type.application"; + }; + FCE7E8AC2593C9C100801E27 /* ViewabilityTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = FCE7E8B42593C9C100801E27 /* Build configuration list for PBXNativeTarget "ViewabilityTests" */; + buildPhases = ( + FCE7E8A92593C9C100801E27 /* Sources */, + FCE7E8AA2593C9C100801E27 /* Frameworks */, + FCE7E8AB2593C9C100801E27 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + FCE7E8B32593C9C100801E27 /* PBXTargetDependency */, + ); + name = ViewabilityTests; + productName = ViewabilityTests; + productReference = FCE7E8AD2593C9C100801E27 /* ViewabilityTests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + FCE7E8BD2593C9D700801E27 /* TrackerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = FCE7E8C52593C9D700801E27 /* Build configuration list for PBXNativeTarget "TrackerTests" */; + buildPhases = ( + FCE7E8BA2593C9D700801E27 /* Sources */, + FCE7E8BB2593C9D700801E27 /* Frameworks */, + FCE7E8BC2593C9D700801E27 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + FCE7E8C42593C9D700801E27 /* PBXTargetDependency */, + ); + name = TrackerTests; + productName = TrackerTests; + productReference = FCE7E8BE2593C9D700801E27 /* TrackerTests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0E877AA723FEA40700DC962F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Xandr; + TargetAttributes = { + 0E877AAE23FEA40700DC962F = { + CreatedOnToolsVersion = 11.3; + LastSwiftMigration = 1200; + }; + FCE7E8AC2593C9C100801E27 = { + CreatedOnToolsVersion = 12.1; + TestTargetID = 0E877AAE23FEA40700DC962F; + }; + FCE7E8BD2593C9D700801E27 = { + CreatedOnToolsVersion = 12.1; + TestTargetID = 0E877AAE23FEA40700DC962F; + }; + }; + }; + buildConfigurationList = 0E877AAA23FEA40700DC962F /* Build configuration list for PBXProject "TrackerApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0E877AA623FEA40700DC962F; + productRefGroup = 0E877AB023FEA40700DC962F /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = FC77571D25374E7000400FE7 /* Products */; + ProjectRef = FC77571C25374E7000400FE7 /* AppNexusSDK.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 0E877AAE23FEA40700DC962F /* TrackerApp */, + FCE7E8AC2593C9C100801E27 /* ViewabilityTests */, + FCE7E8BD2593C9D700801E27 /* TrackerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + FC77572225374E7000400FE7 /* AppNexusSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = AppNexusSDK.framework; + remoteRef = FC77572125374E7000400FE7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + FC77572425374E7000400FE7 /* AppNexusNativeSDK.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = AppNexusNativeSDK.framework; + remoteRef = FC77572325374E7000400FE7 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 0E877AAD23FEA40700DC962F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FC1F3815253D5799006DD370 /* RTBBannerNativeAd.json in Resources */, + FC1DFE9C2590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.storyboard in Resources */, + FC1F3817253D5799006DD370 /* RTBBannerVideoAd.json in Resources */, + 0E49155C24065546003B7CC2 /* AdType.storyboard in Resources */, + FC1F3816253D5799006DD370 /* RTBNativeAd.json in Resources */, + FC1F3813253D5799006DD370 /* RTBVideoAd.json in Resources */, + FC1F3814253D5799006DD370 /* RTBBannerNativeRendererAd.json in Resources */, + 0E49159124065963003B7CC2 /* ANNativeAdView.xib in Resources */, + FCCB89C725AE352D0029E24E /* readme.md in Resources */, + FC1F3819253D5799006DD370 /* RTBInterstitialAd.json in Resources */, + 0E877ABF23FEA40900DC962F /* Assets.xcassets in Resources */, + 0E49158E24065963003B7CC2 /* BannerNativeVideoTrackerTestVC.storyboard in Resources */, + 0E49159C24065E84003B7CC2 /* InterstitialAdTrackerTestVC.storyboard in Resources */, + FC85ACF9258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.storyboard in Resources */, + FC7BCF66258BC31300739FC1 /* OMID_VideoAd.json in Resources */, + FC7BCF3B2588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.storyboard in Resources */, + FC1F3818253D5799006DD370 /* RTBBannerAd.json in Resources */, + 0E877AC223FEA40900DC962F /* LaunchScreen.storyboard in Resources */, + 0E49157624065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.storyboard in Resources */, + FC7BCF40258905DB00739FC1 /* OMID_BannerAd.json in Resources */, + 0E49159224065963003B7CC2 /* NativeAdTrackerTestVC.storyboard in Resources */, + FC7BCF5B258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.storyboard in Resources */, + FC1DFEB92590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.storyboard in Resources */, + FC8FE6E525483AE000971E2A /* UnifiedNativeAdView.xib in Resources */, + FCDE87B625F28CA300E9B117 /* ScrollViewController.storyboard in Resources */, + 0E49158D24065963003B7CC2 /* VideoAdTrackerTestVC.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8AB2593C9C100801E27 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8BC2593C9D700801E27 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0E877AAB23FEA40700DC962F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FC85ACF8258D19C100A64F7D /* VideoAdViewabilityTrackerTestVC.m in Sources */, + FC1DFEB22590E7EF008AE0EB /* ANVerificationScriptResource+ANTest.m in Sources */, + FC77576225374EFB00400FE7 /* ANURLConnectionStub.m in Sources */, + FC1DFECB2591229F008AE0EB /* SDKValidationURLProtocol.m in Sources */, + FCB2469F2539B4FB00600B3D /* NSURLProtocol+WebKitSupport.swift in Sources */, + 0E49159524065ABF003B7CC2 /* ANNativeAdView.m in Sources */, + 0E877AB423FEA40700DC962F /* AppDelegate.m in Sources */, + FC1F380A253D54F5006DD370 /* AdTypeTableViewController.m in Sources */, + FC77576425374EFB00400FE7 /* NSObject+Swizzling.m in Sources */, + FCDE87B325F28CA300E9B117 /* ContentCell.m in Sources */, + 0E49158F24065963003B7CC2 /* BannerNativeVideoTrackerTestVC.m in Sources */, + 0E49159B24065E84003B7CC2 /* InterstitialAdTrackerTestVC.m in Sources */, + FC77575E25374EFB00400FE7 /* ANStubManager.m in Sources */, + 0E877AC523FEA40900DC962F /* main.m in Sources */, + FCB246A12539B4FB00600B3D /* AuthenticationChallengeSender.swift in Sources */, + 0E49157724065911003B7CC2 /* MARBannerNativeRendererAdTrackerTestVC.m in Sources */, + FC1DFE9B2590DA62008AE0EB /* InterstitialAdViewabilityTrackerTestVC.m in Sources */, + FC1DFECA2591229F008AE0EB /* NSURLProtocol+WKWebViewSupport.m in Sources */, + FC77575D25374EFB00400FE7 /* NSURLRequest+HTTPBodyTesting.m in Sources */, + FC7BCF3A2588FC4E00739FC1 /* BannerAdViewabilityTrackerTestVC.m in Sources */, + FC77576125374EFB00400FE7 /* ANHTTPCookieStorage.m in Sources */, + FC1DFEBA2590E8C7008AE0EB /* BannerNativeAdViewabilityTrackerTestVC.m in Sources */, + 0E49159024065963003B7CC2 /* NativeAdTrackerTestVC.m in Sources */, + 0E49158C24065963003B7CC2 /* VideoAdTrackerTestVC.m in Sources */, + FC77576025374EFB00400FE7 /* ANHTTPStubbingManager.m in Sources */, + FC77575F25374EFB00400FE7 /* ANGlobal+ANTest.m in Sources */, + FCDE87B525F28CA300E9B117 /* BannerCell.m in Sources */, + FCB246A02539B4FB00600B3D /* WebKitURLProtocol.swift in Sources */, + FC7BCF5A258B9F8700739FC1 /* BannerVideoAdViewabilityTrackerTestVC.m in Sources */, + FC77576525374EFB00400FE7 /* ANURLConnectionStub+NSURLSessionConfiguration.m in Sources */, + FC1DFECC2591229F008AE0EB /* NSURLSessionConfiguration+ANProtocols.m in Sources */, + FC77576325374EFB00400FE7 /* ANHTTPStubURLProtocol.m in Sources */, + FCDE87B425F28CA300E9B117 /* ScrollViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8A92593C9C100801E27 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FCE7E8D02593C9E300801E27 /* VideoViewabilityTrackerTests.m in Sources */, + FCE7E8CC2593C9E300801E27 /* InterstitialViewabilityTrackerTests.m in Sources */, + FCE7E8CE2593C9E300801E27 /* BannerNativeViewabilityTrackerTests.m in Sources */, + FCE7E8D12593C9E300801E27 /* BannerVideoViewabilityTrackerTests.m in Sources */, + FCE7E8CF2593C9E300801E27 /* NativeViewabilityTrackerTests.m in Sources */, + FCE7E8CD2593C9E300801E27 /* BannerViewabilityTrackerTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FCE7E8BA2593C9D700801E27 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FCE7E8E42593C9ED00801E27 /* VideoAdTrackerTestVC.m in Sources */, + FCE7E8DA2593C9ED00801E27 /* BannerAdTrackerTestVC.m in Sources */, + FCE7E8DE2593C9ED00801E27 /* NativeAdTrackerTestVC.m in Sources */, + FCDE87BA25F2933300E9B117 /* BannerAdOnePXScrollViewController.m in Sources */, + FCE7E8E32593C9ED00801E27 /* InterstitialAdTrackerTestVC.m in Sources */, + FCE7E8DB2593C9ED00801E27 /* BannerNativeRendererAdTrackerTestVC.m in Sources */, + FCE7E8DC2593C9ED00801E27 /* MARBannerNativeRendererAdTrackerTestVC.m in Sources */, + FCE7E8E02593C9ED00801E27 /* BannerNativeAdTrackerTestVC.m in Sources */, + FCE7E8E12593C9ED00801E27 /* BannerVideoAdTrackerTestVC.m in Sources */, + FCE7E8E62593C9ED00801E27 /* MARBannerAdTrackerTestVC.m in Sources */, + FCE7E8DD2593C9ED00801E27 /* MARNativeAdTrackerTestVC.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + FC75564F253D773A00C2C518 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = AppNexusSDK; + targetProxy = FC75564E253D773A00C2C518 /* PBXContainerItemProxy */; + }; + FCE7E8B32593C9C100801E27 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0E877AAE23FEA40700DC962F /* TrackerApp */; + targetProxy = FCE7E8B22593C9C100801E27 /* PBXContainerItemProxy */; + }; + FCE7E8C42593C9D700801E27 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0E877AAE23FEA40700DC962F /* TrackerApp */; + targetProxy = FCE7E8C32593C9D700801E27 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 0E49155A24065546003B7CC2 /* AdType.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0E49155B24065546003B7CC2 /* Base */, + ); + name = AdType.storyboard; + sourceTree = ""; + }; + 0E877AC023FEA40900DC962F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0E877AC123FEA40900DC962F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0E877AC623FEA40900DC962F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/TrackerTest/CSM\""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OBJC_BRIDGING_HEADER = "HelpingLibrary/WkWebViewTracking/TrackerUITest-Bridging-Header.h"; + }; + name = Debug; + }; + 0E877AC723FEA40900DC962F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/TrackerTest/CSM\""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_OBJC_BRIDGING_HEADER = "HelpingLibrary/WkWebViewTracking/TrackerUITest-Bridging-Header.h"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0E877AC923FEA40900DC962F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HR94J6TSB3; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/HelpingLibrary", + "$(PROJECT_DIR)", + "\"$(SRCROOT)/TrackerTest/CSM\"", + "$(PROJECT_DIR)/TrackerTest/CSM", + "\"$(SRCROOT)/../../sdk\"", + "$(PROJECT_DIR)/TrackerApp/CSM", + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../sdk/sourcefiles/native/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/native\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/native/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/internal/config\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/Categories\"", + ); + INFOPLIST_FILE = TrackerApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.1; + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleIntegration; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "HelpingLibrary/WkWebViewTracking/TrackerTest-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0E877ACA23FEA40900DC962F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = HR94J6TSB3; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/HelpingLibrary", + "$(PROJECT_DIR)", + "\"$(SRCROOT)/TrackerTest/CSM\"", + "$(PROJECT_DIR)/TrackerTest/CSM", + "\"$(SRCROOT)/../../sdk\"", + "$(PROJECT_DIR)/TrackerApp/CSM", + ); + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../sdk/sourcefiles/native/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/native\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/native/internal\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/internal/config\"", + "\"$(SRCROOT)/../../sdk/sourcefiles/Categories\"", + ); + INFOPLIST_FILE = TrackerApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0.1; + PRODUCT_BUNDLE_IDENTIFIER = com.xandr.SimpleIntegration; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "HelpingLibrary/WkWebViewTracking/TrackerTest-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + FCE7E8B52593C9C100801E27 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = ViewabilityTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.xandr.-.ViewabilityTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TrackerApp; + }; + name = Debug; + }; + FCE7E8B62593C9C100801E27 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = ViewabilityTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.xandr.-.ViewabilityTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TrackerApp; + }; + name = Release; + }; + FCE7E8C62593C9D700801E27 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = TrackerTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.xandr.-.TrackerTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TrackerApp; + }; + name = Debug; + }; + FCE7E8C72593C9D700801E27 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HR94J6TSB3; + INFOPLIST_FILE = TrackerTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.xandr.-.TrackerTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = TrackerApp; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0E877AAA23FEA40700DC962F /* Build configuration list for PBXProject "TrackerApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E877AC623FEA40900DC962F /* Debug */, + 0E877AC723FEA40900DC962F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0E877AC823FEA40900DC962F /* Build configuration list for PBXNativeTarget "TrackerApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0E877AC923FEA40900DC962F /* Debug */, + 0E877ACA23FEA40900DC962F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FCE7E8B42593C9C100801E27 /* Build configuration list for PBXNativeTarget "ViewabilityTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FCE7E8B52593C9C100801E27 /* Debug */, + FCE7E8B62593C9C100801E27 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FCE7E8C52593C9D700801E27 /* Build configuration list for PBXNativeTarget "TrackerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FCE7E8C62593C9D700801E27 /* Debug */, + FCE7E8C72593C9D700801E27 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0E877AA723FEA40700DC962F /* Project object */; +} diff --git a/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.h b/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.h new file mode 100644 index 000000000..64aa9a5b5 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.h @@ -0,0 +1,30 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + +/* + About AdTypeTableViewController + Used to Open View Controller based on UI test'arguments ([NSProcessInfo processInfo].arguments) and open the targetted ViewController. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AdTypeTableViewController : UITableViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.m b/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.m new file mode 100644 index 000000000..8e9e11a1e --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/AdTypeTableViewController.m @@ -0,0 +1,97 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "AdTypeTableViewController.h" +#import "BannerNativeVideoTrackerTestVC.h" +#import "InterstitialAdTrackerTestVC.h" +#import "Constant.h" +#import "MARBannerNativeRendererAdTrackerTestVC.h" +#import "BannerNativeVideoTrackerTestVC.h" +#import "ANHTTPStubbingManager.h" + +@interface AdTypeTableViewController () +@property (nonatomic, readwrite, strong) NSString *adType; + +@end + +@implementation AdTypeTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Disable mocking based on MockTestcase is set to false(0) + if(!MockTestcase){ + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + } + + + + + // Open BannerNativeVideoTrackerTestVC if arguments contain the BannerAd, BannerNativeAd, BannerVideoAd or BannerNativeRenderer Ad for Impression and Click Tracker + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpressionClickTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:BannerNativeImpressionClickTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererImpressionClickTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:BannerVideoImpressionClickTrackerTest] ) { + [self openViewController:@"BannerNativeVideoTrackerTestVC"]; + } + // Open InterstitialAdTrackerTestVC if arguments contain the Interstitial Ad for Impression and Click Tracker + else if ([[NSProcessInfo processInfo].arguments containsObject:InterstitialImpressionClickTrackerTest]){ + [self openViewController:@"InterstitialAdTrackerTestVC"]; + } + // Open VideoAdTrackerTestVC if arguments contain the Video Ad for Impression and Click Tracker + else if([[NSProcessInfo processInfo].arguments containsObject:VideoImpressionClickTrackerTest] ){ + [self openViewController:@"VideoAdTrackerTestVC"]; + } + // Open NativeAdTrackerTestVC if arguments contain the Native Ad for Impression and Click Tracker + else if( [[NSProcessInfo processInfo].arguments containsObject:NativeImpressionClickTrackerTest] ){ + [self openViewController:@"NativeAdTrackerTestVC"]; + } + // Open MARBannerNativeRendererAdTrackerTestVC if arguments contain the BannerNative Ad, BannerNativeRenderer Ad,Native Ad for Impression and Click Tracker + else if( [[NSProcessInfo processInfo].arguments containsObject:MARBannerImpressionClickTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:MARNativeImpressionClickTrackerTest] ||[[NSProcessInfo processInfo].arguments containsObject:MARBannerNativeRendererImpressionClickTrackerTest] ){ + [self openViewController:@"MARBannerNativeRendererAdTrackerTestVC"]; + } + + // Open BannerAdViewabilityTrackerTestVC if arguments contain the Banner Ad for Viewability Tracker [OMID] + if( [[NSProcessInfo processInfo].arguments containsObject:BannerViewabilityTrackerTest]){ + [self openViewController:@"BannerAdViewabilityTrackerTestVC"]; + } + // Open InterstitialAdViewabilityTrackerTestVC if arguments contain the InterstitialAd for Viewability Tracker [OMID] + else if( [[NSProcessInfo processInfo].arguments containsObject:InterstitialViewabilityTrackerTest]){ + [self openViewController:@"InterstitialAdViewabilityTrackerTestVC"]; + } + // Open BannerNativeAdViewabilityTrackerTestVC if arguments contain the BannerNative Ad, BannerNativeRenderer Ad,Native Ad for Viewability Tracker [OMID] + else if( [[NSProcessInfo processInfo].arguments containsObject:NativeViewabilityTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererViewabilityTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:BannerNativeViewabilityTrackerTest] ){ + [self openViewController:@"BannerNativeAdViewabilityTrackerTestVC"]; + } + // Open BannerVideoAdViewabilityTrackerTestVC if arguments contain the BannerVideo Ad for Viewability Tracker [OMID] + else if( [[NSProcessInfo processInfo].arguments containsObject:BannerVideoViewabilityTrackerTest]){ + [self openViewController:@"BannerVideoAdViewabilityTrackerTestVC"]; + } + // Open VideoAdViewabilityTrackerTestVC if arguments contain the Video Ad for Viewability Tracker [OMID] + else if( [[NSProcessInfo processInfo].arguments containsObject:VideoViewabilityTrackerTest]){ + [self openViewController:@"VideoAdViewabilityTrackerTestVC"]; + }else if( [[NSProcessInfo processInfo].arguments containsObject:BannerImpression1PxTrackerTest] || [[NSProcessInfo processInfo].arguments containsObject:NativeImpression1PxTrackerTest]){ + [self openViewController:@"ScrollViewController"]; + } +} + +// navigation to desire viewController using storyboard Name & ViewController's Identifier +-(void)openViewController:(NSString *)viewController{ + UIStoryboard *sb = [UIStoryboard storyboardWithName:viewController bundle:nil]; + UIViewController *vc = [sb instantiateViewControllerWithIdentifier:viewController]; + [vc setModalPresentationStyle: UIModalPresentationFullScreen]; + [self.navigationController pushViewController:vc animated:YES]; + +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/AppDelegate.h b/tests/TrackerUITest/TrackerApp/AppDelegate.h new file mode 100644 index 000000000..3357d7625 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/AppDelegate.h @@ -0,0 +1,24 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/tests/TrackerUITest/TrackerApp/AppDelegate.m b/tests/TrackerUITest/TrackerApp/AppDelegate.m new file mode 100644 index 000000000..12a6901fe --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/AppDelegate.m @@ -0,0 +1,33 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import "AppDelegate.h" +#import + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + [[ANSDKSettings sharedInstance] optionalSDKInitialization]; + [ANLogManager setANLogLevel:ANLogLevelAll]; + return YES; +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/TrackerUITest/TrackerApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d8db8d65f --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tests/TrackerUITest/TrackerApp/Assets.xcassets/Contents.json b/tests/TrackerUITest/TrackerApp/Assets.xcassets/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/tests/TrackerUITest/TrackerApp/Base.lproj/AdType.storyboard b/tests/TrackerUITest/TrackerApp/Base.lproj/AdType.storyboard new file mode 100644 index 000000000..7a85d2d67 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Base.lproj/AdType.storyboard @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/Base.lproj/LaunchScreen.storyboard b/tests/TrackerUITest/TrackerApp/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/Constant.h b/tests/TrackerUITest/TrackerApp/Constant.h new file mode 100644 index 000000000..e1d607844 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Constant.h @@ -0,0 +1,96 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/* + About Constant + Delcear the Constant for Application and Test target + */ + + +/** + @param MockTestcase : 1 to enable mocking and 0 to disbable mocking + */ +#define MockTestcase 1 +/** + @param ForceCreative : 1 to enable force creative and 0 to disbable force creative + */ +#define ForceCreative 1 +// To use live placement for testing set MockTestcase 0 & ForceCreative 0 + +/** + Set Placaement Id for different type of Ad + */ +#define BannerPlacementId @"19213468" +#define NativePlacementId @"19213468" +#define BannerNativeRendererPlacementId @"20331545" +#define VideoPlacementId @"19213468" +#define InterstitialPlacementId @"19213468" + +/** + Set Creative Id for different type of Ad + */ +#define BannerForceCreativeId 156075267 +#define NativeForceCreativeId 142877136 +#define VideoForceCreativeId 162035356 +#define InterstitialForceCreativeId 156075267 + +/** + Constant used to run testcase and track URL for Click and Impression Tracker + */ +#define BannerImpressionClickTrackerTest @"BannerImpressionClickTrackerTest" +#define BannerNativeImpressionClickTrackerTest @"BannerNativeImpressionClickTrackerTest" +#define BannerNativeRendererImpressionClickTrackerTest @"BannerNativeRendererImpressionClickTrackerTest" +#define BannerVideoImpressionClickTrackerTest @"BannerVideoImpressionClickTrackerTest" +#define InterstitialImpressionClickTrackerTest @"InterstitialImpressionClickTrackerTest" +#define VideoImpressionClickTrackerTest @"VideoImpressionClickTrackerTest" +#define NativeImpressionClickTrackerTest @"NativeImpressionClickTrackerTest" +#define MARBannerImpressionClickTrackerTest @"MARBannerImpressionClickTrackerTest" +#define MARNativeImpressionClickTrackerTest @"MARNativeImpressionClickTrackerTest" +#define MARBannerNativeRendererImpressionClickTrackerTest @"MARBannerNativeRendererImpressionClickTrackerTest" +#define BannerImpression1PxTrackerTest @"BannerImpression1PxTrackerTest" +#define NativeImpression1PxTrackerTest @"NativeImpression1PxTrackerTest" + +/** + Constant used to run testcase and track URL for OMID Tracker + */ +#define BannerViewabilityTrackerTest @"BannerViewabilityTrackerTest" +#define BannerNativeViewabilityTrackerTest @"BannerNativeViewabilityTrackerTest" +#define BannerNativeRendererViewabilityTrackerTest @"BannerNativeRendererViewabilityTrackerTest" +#define BannerVideoViewabilityTrackerTest @"BannerVideoViewabilityTrackerTest" +#define InterstitialViewabilityTrackerTest @"InterstitialViewabilityTrackerTest" +#define VideoViewabilityTrackerTest @"VideoViewabilityTrackerTest" +#define NativeViewabilityTrackerTest @"NativeViewabilityTrackerTest" +#define MARBannerViewabilityTrackerTest @"MARBannerViewabilityTrackerTest" +#define MARNativeViewabilityTrackerTest @"MARNativeViewabilityTrackerTest" +#define MARBannerNativeRendererViewabilityTrackerTest @"MARBannerNativeRendererViewabilityTrackerTest" + +/** + List of possible URL that can be fired during click events + */ +#define clickTrackerURLRTB [NSArray arrayWithObjects: @"https://sin1-mobile.adnxs.com/click?",@"http://nym1-ib.adnxs.com/click?",@"https://nym1-mobile.adnxs.com/click?",@"https://sin3-ib.adnxs.com/click?",@"https://sin3-ib.adnxs.com/vevent?an_audit=0",@"https://wiki.xandr.com",@"https://www.xandr.com/",nil] +/** + List of possible URL that can be fired during impression events + */ +#define impressionTrackerURLRTB [NSArray arrayWithObjects: @"https://sin1-mobile.adnxs.com/it?",@"http://nym1-ib.adnxs.com/it?",@"https://nym1-mobile.adnxs.com/it?",@"https://sin3-ib.adnxs.com/it?",@"https://nym1-ib.adnxs.com/vevent?an_audit=0",@"https://nym1-ib.adnxs.com/it?an_audit=0",nil] + +/** + Test case will wait for 25 Second for Click Tracker + */ +#define ClickTrackerTimeout 25 +/** + Test case will wait for 25 Second for Impression Tracker + */ +#define ImpressionTrackerTimeout 25 + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.h new file mode 100644 index 000000000..db7232b9c --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.h @@ -0,0 +1,25 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About BannerNativeVideoTrackerTestVC + Load BannerAd , NativeAd or VideoAd based on Selected UI Testcase + To test impression and click tracker is fired by SDK + */ +@interface BannerNativeVideoTrackerTestVC : UIViewController + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.m new file mode 100644 index 000000000..598718886 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.m @@ -0,0 +1,217 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "BannerNativeVideoTrackerTestVC.h" +#import "ANBannerAdView.h" +#import "ANGlobal.h" +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" +@interface BannerNativeVideoTrackerTestVC () + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; + + +@end + +@implementation BannerNativeVideoTrackerTestVC + +- (void)viewDidLoad +{ + [super viewDidLoad]; + +// MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } + else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + int adWidth = 300; + int adHeight = 250; + + + // Select placement Id based on Selected UI testcase + NSString *adID = BannerPlacementId; + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpressionClickTrackerTest]) { + adID = BannerPlacementId; + }else if ([[NSProcessInfo processInfo].arguments containsObject:BannerNativeImpressionClickTrackerTest]) { + adID = NativePlacementId; + } else if([[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererImpressionClickTrackerTest]){ + adID = BannerNativeRendererPlacementId; + }else if([[NSProcessInfo processInfo].arguments containsObject:BannerVideoImpressionClickTrackerTest]){ + adID = VideoPlacementId; + } + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Prepair the BannerAd + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:adID adSize:size]; + self.banner.rootViewController = self; + // Select Creative Id based on Selected UI testcase + [self setCreativeId]; + // Select Allow Media Type based on Selected UI testcase + [self allowMediaType]; + self.banner.delegate = self; + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.view addSubview:self.banner]; + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 0; + [self.banner loadAd]; +} +// Select Allow Media Type based on Selected UI testcase +-(void)allowMediaType{ + + if ([[NSProcessInfo processInfo].arguments containsObject:BannerNativeImpressionClickTrackerTest]) { + self.banner.shouldAllowNativeDemand = YES; + } else if([[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererImpressionClickTrackerTest]){ + self.banner.shouldAllowNativeDemand = YES; + self.banner.enableNativeRendering = YES; + }else if([[NSProcessInfo processInfo].arguments containsObject:BannerVideoImpressionClickTrackerTest]){ + self.banner.shouldAllowVideoDemand = YES; + } +} + +// Select Creative Id based on Selected UI testcase +-(void)setCreativeId{ + if(ForceCreative){ + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpressionClickTrackerTest]) { + self.banner.forceCreativeId = BannerForceCreativeId; + }else if ([[NSProcessInfo processInfo].arguments containsObject:BannerNativeImpressionClickTrackerTest]) { + self.banner.forceCreativeId = NativeForceCreativeId; + } else if([[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererImpressionClickTrackerTest]){ + self.banner.forceCreativeId = NativeForceCreativeId; + }else if([[NSProcessInfo processInfo].arguments containsObject:BannerVideoImpressionClickTrackerTest]){ + self.banner.forceCreativeId = VideoForceCreativeId; + } + } +} + +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} + +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpressionClickTrackerTest]) { + self.title = @"BannerAd"; + } + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + // Select Stub Response based on Selected UI testcase + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpressionClickTrackerTest]) { + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerAd"]; + }else if ([[NSProcessInfo processInfo].arguments containsObject:BannerNativeImpressionClickTrackerTest]) { + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeAd"]; + }else if([[NSProcessInfo processInfo].arguments containsObject:BannerNativeRendererImpressionClickTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeRendererAd"]; + }else if([[NSProcessInfo processInfo].arguments containsObject:BannerVideoImpressionClickTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerVideoAd"]; + } +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)ad:(id)loadInstance didReceiveNativeAd:(id)responseInstance{ + self.nativeAdResponse = (ANNativeAdResponse *)responseInstance; + + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + ANNativeAdView *nativeAdView = [array firstObject]; + nativeAdView.titleLabel.text = self.nativeAdResponse.title; + nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + nativeAdView.callToActionButton.accessibilityIdentifier = @"clickElements"; + + [nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + [self.view addSubview:nativeAdView]; + [self.nativeAdResponse registerViewForTracking:nativeAdView + withRootViewController:self + clickableViews:@[nativeAdView.callToActionButton,nativeAdView.mainImageView] + error:nil]; +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +# pragma mark - Ad Server Response Stubbing + +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.impressionTracker.text = @"ImpressionTracker"; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.clickTracker.text = @"ClickTracker"; + } + } + }); +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.storyboard new file mode 100644 index 000000000..2dab461b4 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/BannerAd/BannerNativeVideoTrackerTestVC.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.h new file mode 100644 index 000000000..659216164 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.h @@ -0,0 +1,27 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN +/* + About InterstitialAdTrackerTestVC + Load InterstitialAd based on Selected UI Testcase + To test impression and click tracker is fired by SDK + */ +@interface InterstitialAdTrackerTestVC : UIViewController +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.m new file mode 100644 index 000000000..a2e7d1a8f --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.m @@ -0,0 +1,122 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "InterstitialAdTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface InterstitialAdTrackerTestVC () + +@property (strong, nonatomic) ANInterstitialAd *interstitialAd; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; + +@end + +@implementation InterstitialAdTrackerTestVC + +- (void)viewDidLoad { + [super viewDidLoad]; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } + else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + self.title = @"Interstitial Ad"; + dispatch_async(dispatch_get_main_queue(), ^{ + self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:InterstitialPlacementId]; + self.interstitialAd.delegate = self; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.interstitialAd.forceCreativeId = InterstitialForceCreativeId; + } + self.interstitialAd.clickThroughAction = ANClickThroughActionReturnURL; + [self.interstitialAd dismissOnClick]; + [self.interstitialAd loadAd]; + }); +} + +#pragma mark - ANInterstitialAdDelegate + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"adDidReceiveAd"); + [self.interstitialAd displayAdFromViewController:self autoDismissDelay:5]; +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + self.title = @"Interstitial Ad"; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + if ([[NSProcessInfo processInfo].arguments containsObject:InterstitialImpressionClickTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBInterstitialAd"]; + } +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.impressionTracker.text = @"ImpressionTracker"; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.clickTracker.text = @"ClickTracker"; + } + } + + }); +} + + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.storyboard new file mode 100644 index 000000000..fcb541f47 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/InterstitialAd/InterstitialAdTrackerTestVC.storyboard @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.h new file mode 100644 index 000000000..b9dc9d09e --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.h @@ -0,0 +1,27 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +#import + +/* + About MARBannerNativeRendererAdTrackerTestVC + Load MAR BannerNativeRenderer Ad based on Selected UI Testcase + To test impression and click tracker is fired by SDK + */ + +@interface MARBannerNativeRendererAdTrackerTestVC : UIViewController + + +@end + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.m new file mode 100644 index 000000000..37c626e92 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.m @@ -0,0 +1,238 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "MARBannerNativeRendererAdTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import +#import "ANHTTPStubbingManager.h" +#import "Constant.h" +@interface MARBannerNativeRendererAdTrackerTestVC () +@property (weak, nonatomic) IBOutlet UIView *bannerAdView; +@property (weak, nonatomic) IBOutlet UIView *nativeAdView; +@property (weak, nonatomic) IBOutlet UIImageView *nativeIconImageView; +@property (weak, nonatomic) IBOutlet UIImageView *nativeMainImageView; +@property (weak, nonatomic) IBOutlet UILabel *nativeTitleLabel; +@property (weak, nonatomic) IBOutlet UILabel *nativeBodyLabel; +@property (weak, nonatomic) IBOutlet UILabel *nativesponsoredLabel; + + +@property (strong, nonatomic) ANBannerAdView *bannerAd; +@property (strong, nonatomic) ANInterstitialAd *interstitialAd; +@property (strong, nonatomic) ANNativeAdRequest *nativeAdRequest; +@property (strong, nonatomic) ANNativeAdResponse *nativeAdResponse; +@property (strong, nonatomic) ANInstreamVideoAd *videoAd; +@property (strong, nonatomic) ANMultiAdRequest *marAdRequest; + +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; +@property (weak, nonatomic) IBOutlet UITableViewCell *bannerCell; + + +@end + +@implementation MARBannerNativeRendererAdTrackerTestVC + +- (void)viewDidLoad { + [super viewDidLoad]; + [self prepareStubbing]; + + + self.bannerCell.frame = CGRectMake(self.bannerCell.frame.origin.x, self.bannerCell.frame.origin.y, self.bannerCell.frame.size.width, 10); + // Disable stubbing + + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + + self.title = @"Multi Ad Request"; + + + self.bannerAdView.hidden = YES; + self.nativeAdView.hidden = YES; + // Init ANMultiAdRequest + // Prepair the ANMultiAdRequest + self.marAdRequest = [[ANMultiAdRequest alloc] initWithMemberId:10094 andDelegate:self]; + if( [[NSProcessInfo processInfo].arguments containsObject:MARBannerImpressionClickTrackerTest]){ + [self.marAdRequest addAdUnit:[self createBannerAd:self.bannerAdView andPlacementId:BannerPlacementId]]; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.bannerAd.forceCreativeId = BannerForceCreativeId; + } + self.bannerAdView.hidden = NO; + }else if ([[NSProcessInfo processInfo].arguments containsObject:MARNativeImpressionClickTrackerTest]){ + [self.marAdRequest addAdUnit:[self createNativeAd]]; + self.nativeAdView.hidden = NO; + }else if ([[NSProcessInfo processInfo].arguments containsObject:MARBannerNativeRendererImpressionClickTrackerTest]){ + [self.marAdRequest addAdUnit:[self createBannerAd:self.bannerAdView andPlacementId:BannerNativeRendererPlacementId]]; + self.bannerAd.shouldAllowNativeDemand = YES; + self.bannerAd.shouldAllowBannerDemand = NO; + self.bannerAd.enableNativeRendering = YES; + self.bannerAdView.hidden = NO; + } + + [self.marAdRequest load]; + +} + +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} + +// Create Banner Ad Object +- (ANBannerAdView *)createBannerAd:(UIView *) adView andPlacementId:(NSString *)placement +{ + self.bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:placement adSize:CGSizeMake(300, 250)]; + self.bannerAd.rootViewController =self; + self.bannerAd.delegate =self; + self.bannerAd.shouldResizeAdToFitContainer = YES; + [adView addSubview:self.bannerAd]; + return self.bannerAd; + +} + +// Create Interstitial Ad Object +- (ANInterstitialAd *)createInterstitialAd +{ + self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:@"19213468"]; + self.interstitialAd.delegate =self; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.interstitialAd.forceCreativeId = InterstitialForceCreativeId; + } + return self.interstitialAd; + +} + + +// Create InstreamVideo Ad Object +- (ANInstreamVideoAd *)createVideoAd +{ + self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:VideoPlacementId]; + self.videoAd.loadDelegate =self; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.videoAd.forceCreativeId = VideoForceCreativeId; + } + return self.videoAd; +} + +// Create Native Ad Object +- (ANNativeAdRequest *)createNativeAd +{ + self.nativeAdRequest = [[ANNativeAdRequest alloc] init]; + self.nativeAdRequest.placementId = NativePlacementId; + self.nativeAdRequest.shouldLoadIconImage = YES; + self.nativeAdRequest.shouldLoadMainImage = YES; + self.nativeAdRequest.delegate = self; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.nativeAdRequest.forceCreativeId = NativeForceCreativeId; + } + return self.nativeAdRequest; +} + + + +#pragma mark - Delegate methods exclusively for ANMultiAdRequest. +- (void) multiAdRequestDidComplete:(nonnull ANMultiAdRequest *)mar{ + NSLog(@"Multi Ad Request Did Complete"); +} + +- (void) multiAdRequest:(nonnull ANMultiAdRequest *)mar didFailWithError:(nonnull NSError *)error{ + NSLog(@"MultiAdRequest failed with error : \(error)"); +} + +#pragma mark - Delegate methods exclusively for ANAdDelegate. + +- (void)adDidReceiveAd:(id)ad +{ + if([ad isKindOfClass:[ANInterstitialAd class]] && [self.interstitialAd isReady]){ + NSLog(@"Interstitial Ad did Receive"); + [self.interstitialAd displayAdFromViewController:self]; + } +// else if([ad isKindOfClass:[ANInstreamVideoAd class]]){ +// NSLog(@"Video Ad did Receive"); +// [self.videoAd playAdWithContainer:self.videoAdView withDelegate:self]; +// } + else if([ad isKindOfClass:[ANBannerAdView class]]){ + NSLog(@"Banner Ad did Receive"); + } +} + +- (void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"requestFailedWithError %@:",error); + +} + +#pragma mark - Delegate methods exclusively for ANNativeAd. +- (void)adRequest:(ANNativeAdRequest *)request didFailToLoadWithError:(NSError *)error withAdResponseInfo:(ANAdResponseInfo *)adResponseInfo{ + NSLog(@"requestFailedWithError %@:",error); +} + +- (void)adRequest:(ANNativeAdRequest *)request didReceiveResponse:(ANNativeAdResponse *)response{ + NSLog(@"Native Ad did Receive"); + + self.nativeAdResponse = response; + self.nativeIconImageView.image = self.nativeAdResponse.iconImage; + self.nativeMainImageView.image = self.nativeAdResponse.mainImage; + self.nativeTitleLabel.text = self.nativeAdResponse.title; + self.nativeBodyLabel.text = self.nativeAdResponse.body; + self.nativesponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + [self.nativeAdResponse registerViewForTracking:self.nativeAdView + withRootViewController:self + clickableViews:@[self.nativeAdView] + error:nil]; +} + + +# pragma mark - Ad Server Response Stubbing + +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.impressionTracker.text = @"ImpressionTracker"; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.clickTracker.text = @"ClickTracker"; + } + } + + }); +} + + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.storyboard new file mode 100644 index 000000000..f5d9abe28 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/MultiAdRequest/MARBannerNativeRendererAdTrackerTestVC.storyboard @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.h new file mode 100644 index 000000000..619b6ead2 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.h @@ -0,0 +1,26 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@interface ANNativeAdView : UIView +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; +@property (weak, nonatomic) IBOutlet UILabel *bodyLabel; +@property (weak, nonatomic) IBOutlet UIImageView *iconImageView; +@property (weak, nonatomic) IBOutlet UIImageView *mainImageView; +@property (weak, nonatomic) IBOutlet UIButton *callToActionButton; +@property (weak, nonatomic) IBOutlet UILabel *sponsoredLabel; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.m new file mode 100644 index 000000000..ebf4f3a85 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.m @@ -0,0 +1,20 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANNativeAdView.h" + +@implementation ANNativeAdView + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.xib b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.xib new file mode 100644 index 000000000..6b882eeed --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/ANNativeAdView.xib @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/Admob/UnifiedNativeAdView.xib b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/Admob/UnifiedNativeAdView.xib new file mode 100644 index 000000000..14e2568fa --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/Admob/UnifiedNativeAdView.xib @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.h new file mode 100644 index 000000000..d19ce759e --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About NativeAdTrackerTestVC + Load Native Ad based on Selected UI Testcase + To test impression and click tracker is fired by SDK + */ + +@interface NativeAdTrackerTestVC : UIViewController + + +@end + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.m new file mode 100644 index 000000000..53be2147c --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.m @@ -0,0 +1,142 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "NativeAdTrackerTestVC.h" +#import +#import "ANNativeAdView.h" +#import "ANStubManager.h" +#import +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface NativeAdTrackerTestVC () +@property (nonatomic,readwrite,strong) ANNativeAdRequest *nativeAdRequest; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; + +@end + +@implementation NativeAdTrackerTestVC + + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"Native Ad"; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } + else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + self.nativeAdRequest= [[ANNativeAdRequest alloc] init]; + self.nativeAdRequest.placementId = NativePlacementId; + self.nativeAdRequest.forceCreativeId = NativeForceCreativeId; + self.nativeAdRequest.gender = ANGenderMale; + self.nativeAdRequest.shouldLoadIconImage = YES; + self.nativeAdRequest.shouldLoadMainImage = YES; + self.nativeAdRequest.delegate = self; + [self.nativeAdRequest loadAd]; +} + +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} + +- (void)adRequest:(ANNativeAdRequest *)request didReceiveResponse:(ANNativeAdResponse *)response { + // (code which loads the view) + self.nativeAdResponse = response; + + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + ANNativeAdView *nativeAdView = [array firstObject]; + nativeAdView.titleLabel.text = self.nativeAdResponse.title; + nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + + nativeAdView.callToActionButton.accessibilityIdentifier = @"clickElements"; + + + [nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + + [self.view addSubview:nativeAdView]; + + [self.nativeAdResponse registerViewForTracking:nativeAdView + withRootViewController:self + clickableViews:@[nativeAdView.callToActionButton,nativeAdView.mainImageView] + error:nil]; + +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + + +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if([[NSProcessInfo processInfo].arguments containsObject:NativeImpressionClickTrackerTest] ){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBNativeAd"]; + } +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.impressionTracker.text = @"ImpressionTracker"; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.clickTracker.text = @"ClickTracker"; + } + } + + }); +} +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.storyboard new file mode 100644 index 000000000..1e58593c8 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/NativeAd/NativeAdTrackerTestVC.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.h new file mode 100644 index 000000000..2ef7386ab --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.h @@ -0,0 +1,18 @@ +// +// BannerCell.h +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface BannerCell : UITableViewCell + +@property (weak, nonatomic) IBOutlet UIView *bannerView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.m new file mode 100644 index 000000000..8ad3dcb7e --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/BannerCell.m @@ -0,0 +1,23 @@ +// +// BannerCell.m +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import "BannerCell.h" + +@implementation BannerCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.h new file mode 100644 index 000000000..69b15088a --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.h @@ -0,0 +1,16 @@ +// +// ContentCell.h +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface ContentCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *label; +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.m new file mode 100644 index 000000000..64b7803bb --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ContentCell.m @@ -0,0 +1,23 @@ +// +// ContentCell.m +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import "ContentCell.h" + +@implementation ContentCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.h new file mode 100644 index 000000000..33e9f650c --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.h @@ -0,0 +1,16 @@ +// +// ScrollViewController.h +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import + +@interface ScrollViewController : UIViewController + +@property (weak, nonatomic) IBOutlet UITableView *adView; + + +@end + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.m new file mode 100644 index 000000000..f92648753 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.m @@ -0,0 +1,203 @@ +// +// ViewController.m +// BannerLoadPerformance +// +// Created by Punnaghai Puviarasu on 11/3/20. +// + +#import "ScrollViewController.h" +#import "BannerCell.h" +#import "ContentCell.h" +#import +#import "Constant.h" +#import "ANStubManager.h" +#import "ANHTTPStubbingManager.h" +#import +#import "ANNativeAdView.h" + +@interface ScrollViewController () + +@property (strong, nonatomic) ANBannerAdView *bannerAd10; +@property (nonatomic,readwrite,strong) ANNativeAdRequest *nativeAdRequest; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; +@end + +@implementation ScrollViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + [ANLogManager setANLogLevel:ANLogLevelAll]; + ANSDKSettings.sharedInstance.countImpressionOn1PxRendering = YES; + + if(MockTestcase){ + [self prepareStubbing]; + } + else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + [self registerEventListener]; + + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpression1PxTrackerTest]) { + if(self.bannerAd10 == nil){ + self.bannerAd10 = [self createBannerAd]; + [self.bannerAd10 loadAd]; + } + + } else if ([[NSProcessInfo processInfo].arguments containsObject:NativeImpression1PxTrackerTest]){ + self.nativeAdRequest= [[ANNativeAdRequest alloc] init]; + self.nativeAdRequest.placementId = NativePlacementId; + self.nativeAdRequest.forceCreativeId = NativeForceCreativeId; + self.nativeAdRequest.gender = ANGenderMale; + self.nativeAdRequest.shouldLoadIconImage = YES; + self.nativeAdRequest.shouldLoadMainImage = YES; + self.nativeAdRequest.delegate = self; + [self.nativeAdRequest loadAd]; + } + + + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +-(void)prepareStubbing{ + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + if ([[NSProcessInfo processInfo].arguments containsObject:BannerImpression1PxTrackerTest]) { + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerAd"]; + + } else if ([[NSProcessInfo processInfo].arguments containsObject:NativeImpression1PxTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBNativeAd"]; + } +} + + +- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { + + if(indexPath.row == 9){ + BannerCell *cell = (BannerCell *)[self.adView dequeueReusableCellWithIdentifier:@"BannerCell"]; + if(self.bannerAd10 == nil){ + self.bannerAd10 = [self createBannerAd]; + [self.bannerAd10 loadAd]; + } + [cell.bannerView addSubview:self.bannerAd10]; + + return cell; + } else { + ContentCell *cell = (ContentCell *)[self.adView dequeueReusableCellWithIdentifier:@"ContentCell"]; + + //cell.label.text = [NSString stringWithFormat:@"%ld", (long)indexPath.row]; + + return cell; + } + + +} + +- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 10; +} + +// Create Banner Ad Object +- (ANBannerAdView *)createBannerAd{ + + ANBannerAdView *bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0 ,self.navigationController.navigationBar.frame.size.height, 320, 50) placementId:@"20814126" adSize:CGSizeMake(320, 50)]; + bannerAd.rootViewController =self; + bannerAd.delegate =self; + bannerAd.shouldResizeAdToFitContainer = YES; + bannerAd.forceCreativeId = BannerForceCreativeId; + //bannerAd.countImpressionOnAdReceived = YES; + bannerAd.autoRefreshInterval = 0; + return bannerAd; +} + +- (void)adDidReceiveAd:(id)ad +{ + NSLog(@"Banner Ad did Receive"); + + // Delay execution of my block for 10 seconds. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + self.title = @"Not Fired"; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [self.view addSubview:self.bannerAd10]; + }); + }); + +} + +- (void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"requestFailedWithError %@:",error); + +} + +- (void)adRequest:(ANNativeAdRequest *)request didReceiveResponse:(ANNativeAdResponse *)response { + // (code which loads the view) + self.nativeAdResponse = response; + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + ANNativeAdView *nativeAdView = [array firstObject]; + nativeAdView.titleLabel.text = self.nativeAdResponse.title; + nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + + nativeAdView.callToActionButton.accessibilityIdentifier = @"clickElements"; + [nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + [self.nativeAdResponse registerViewForTracking:nativeAdView + withRootViewController:self + clickableViews:@[nativeAdView.callToActionButton,nativeAdView.mainImageView] + error:nil]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + self.title = @"Not Fired"; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ + [self.view addSubview:nativeAdView]; + }); + }); +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + + +# pragma mark - Ad Server Response Stubbing + +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.title = @"ImpressionTracker"; +// self.impressionTracker.text = ; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ +// self.clickTracker.text = @"ClickTracker"; + } + } + }); +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.storyboard new file mode 100644 index 000000000..551676267 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/ScrollView/ScrollViewController.storyboard @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.h new file mode 100644 index 000000000..688c0ef14 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.h @@ -0,0 +1,29 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About VideoAdTrackerTestVC + Load Video Ad based on Selected UI Testcase + To test impression and click tracker is fired by SDK + */ + + +@interface VideoAdTrackerTestVC : UIViewController + + +@end + diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.m new file mode 100644 index 000000000..b8301b88a --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.m @@ -0,0 +1,178 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "VideoAdTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@import AVFoundation; + +#import + +@interface VideoAdTrackerTestVC () + +@property(nonatomic, weak) IBOutlet UIView *videoView; +@property (strong, nonatomic) ANInstreamVideoAd *videoAd; +@property (weak, nonatomic) IBOutlet UIButton *playButton; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; +@property (weak, nonatomic) IBOutlet UILabel *adLoaded; + + +@end + + + +@implementation VideoAdTrackerTestVC + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.title = @"Video Ad"; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + self.playButton.hidden = YES; + self.playButton.layer.zPosition = MAXFLOAT; + [ANLogManager setANLogLevel:ANLogLevelAll]; + // Fix iPhone issue of log text starting in the middle of the UITextView + self.automaticallyAdjustsScrollViewInsets = NO; + + + [self setupContentPlayer]; + self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:VideoPlacementId]; + self.videoAd.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.videoAd.forceCreativeId = VideoForceCreativeId; + } + [self.videoAd loadAdWithDelegate:self]; + + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)playButton_Touch:(id)sender { + self.playButton.hidden = true; + [self.videoAd playAdWithContainer:self.videoView withDelegate:self]; + +} + + +-(void) setupContentPlayer { + [self.videoView setNeedsLayout]; + self.videoView.translatesAutoresizingMaskIntoConstraints = YES; + +} + +#pragma mark Utility methods + +-(void)itemDidFinishPlaying:(NSNotification *) notification { + NSLog(@"finished playing content"); + //cleanup the player & start again + [self setupContentPlayer]; + self.playButton.hidden = NO; +} + +- (void)logMessage:(NSString *)log { + NSString *logString = [NSString stringWithFormat:@"%@\n", log]; + NSLog(@"%@\n", logString); +} + +-(void)getAdPlayElapsedTime{ + + // To get AdPlayElapsedTime + NSUInteger getAdPlayElapsedTime = [self.videoAd getAdPlayElapsedTime]; + [self logMessage:[NSString stringWithFormat:@"AdPlayElapsedTime : %lu",(unsigned long)getAdPlayElapsedTime]]; + +} +#pragma mark - ANInstreamVideoAdDelegate. + +//----------------------------- -o- +- (void) adDidReceiveAd: (id)ad +{ + self.adLoaded.text = @"adDidReceiveAd"; + // self.playButton.hidden = NO; + [self.videoAd playAdWithContainer:self.videoView withDelegate:self]; + + +} + +- (void) ad: (id)ad + requestFailedWithError: (NSError *)error +{ + [self logMessage:@"adRequestFailedWithError"]; +} + + +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBVideoAd"]; +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + // Loop for Impression Tracker and match with the returned URL if matched set the label to ImpressionTracker. + for (NSString* url in impressionTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.impressionTracker.text = @"ImpressionTracker"; + } + } + // Loop for Click Tracker and match with the returned URL if matched set the label to ClickTracker. + for (NSString* url in clickTrackerURLRTB){ + if([absoluteURLText containsString:url]){ + self.clickTracker.text = @"ClickTracker"; + } + } + + }); +} +@end diff --git a/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.storyboard new file mode 100644 index 000000000..793917095 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ImpressionTracker/VideoAd/VideoAdTrackerTestVC.storyboard @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/Info.plist b/tests/TrackerUITest/TrackerApp/Info.plist new file mode 100644 index 000000000..fe7261b59 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/Info.plist @@ -0,0 +1,52 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + 1 + GADIsAdManagerApp + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + AdType + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..c7da5c014 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About BannerAdViewabilityTrackerTestVC + Load BannerAd Selected UI Testcase + To test OMID Events is fired by SDK + */ + +@interface BannerAdViewabilityTrackerTestVC : UIViewController +// Used to set navigation bar title +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..478aa87c3 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.m @@ -0,0 +1,307 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "BannerAdViewabilityTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface BannerAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (strong, nonatomic) NSMutableArray *eventList; +@property (strong, nonatomic) NSArray *uiTestList; + +@end + +@implementation BannerAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + + // store the list of argument passed by UI test by UI Test + self.uiTestList = [NSProcessInfo processInfo].arguments; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + + isAdVisible = true; + + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + int adWidth = 300; + int adHeight = 250; + + // We want to center our ad on the screen. + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + + // Needed for when we create our ad view. + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Make a banner ad view. + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:BannerPlacementId adSize:size]; + self.banner.rootViewController = self; + self.banner.shouldAllowNativeDemand = NO; + self.banner.enableNativeRendering = NO; + self.banner.shouldAllowVideoDemand = NO; + self.banner.shouldAllowBannerDemand = YES; + self.banner.delegate = self; + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.view addSubview:self.banner]; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.banner.forceCreativeId = BannerForceCreativeId; + } + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 0; + self.eventList = [[NSMutableArray alloc] init]; + self.tableView.hidden = YES; + [self.banner loadAd]; + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} + +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if( [self.uiTestList containsObject:BannerViewabilityTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"OMID_BannerAd"]; + } +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); + // To Hide add after 2 second so that we can track the Viewablity zero + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + + +} + +// To Hide/Show add after 2 second so that we can track the Viewablity 0% & 100% +-(void) hideShowAdAction { + if(isAdVisible){ + self.banner.hidden = true; + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + + } + else{ + self.banner.hidden = false; + [NSTimer scheduledTimerWithTimeInterval:15 + target:self + selector:@selector(removeBannerAdAction) + userInfo:nil + repeats:NO]; + + } + isAdVisible = !isAdVisible; +} + + + +// Remove Banner Ad to call Session Finish +- (void)removeBannerAdAction { + [self.banner removeFromSuperview]; + self.banner = nil; + + double delayInSeconds = 5.0; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + self.tableView.hidden = NO; + [self.tableView reloadData]; + }); + + +} + + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + + if([absoluteURLText containsString:@"https://complianceomsdk.iabtechlab.com/omsdk/sendmessage?version=1.0.2-dev"]){ + if( [self.uiTestList containsObject:@"VersionEvent"]){ + [self.eventList addObject:@"version=1.0.2-dev"]; + } + }else if([absoluteURLText containsString:@"https://complianceomsdk.iabtechlab.com/omsdk/sendmessage?supported=yes"]){ + + if( [self.uiTestList containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"supported=yes"]; + } + }else if([absoluteURLText containsString:@"type=geometryChange"] && [absoluteURLText containsString:@"percentageInView%5D=0"]){ + + if( [self.uiTestList containsObject:@"Viewable0Percentage"]){ + [self.eventList addObject:@"percentageInView=0"]; + [self.eventList addObject:@"type=geometryChange"]; + } + + + }else if([absoluteURLText containsString:@"type=impression&data%5BimpressionType%5D=viewable&data%5BmediaType%5D=display&data%5BcreativeType%5D=htmlDisplay"]){ + + if( [self.uiTestList containsObject:@"TypeImpression"]){ + [self.eventList addObject:@"type=impression"]; + [self.eventList addObject:@"impressionType=viewable"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=htmlDisplay"]; + } + + }else if([absoluteURLText containsString:@"type=sessionStart"]){ + if( [self.uiTestList containsObject:@"SessionStart"]){ + + + [self.eventList addObject:@"sessionStart"]; + if([absoluteURLText containsString:@"environment%5D=app"]){ + [self.eventList addObject:@"environment=app"]; + } + if([absoluteURLText containsString:@"adSessionType%5D=html"]){ + [self.eventList addObject:@"adSessionType=html"]; + } + if([absoluteURLText containsString:@"supports%5D%5B0%5D=clid&data%5Bcontext%5D%5Bsupports%5D%5B1%5D=vlid"]){ + [self.eventList addObject:@"supports=[clid,vlid]"]; + } + if([absoluteURLText containsString:@"mediaType%5D=display"]){ + [self.eventList addObject:@"mediaType=display"]; + } + if([absoluteURLText containsString:@"partnerName%5D=Appnexus"]){ + [self.eventList addObject:@"partnerName=Appnexus"]; + } + if([absoluteURLText containsString:@"deviceInfo%5D%5BdeviceType"]){ + [self.eventList addObject:@"deviceInfo=iOS"]; + } + if([absoluteURLText containsString:@"impressionType%5D=viewable"]){ + [self.eventList addObject:@"impressionType=viewable"]; + } + if([absoluteURLText containsString:@"creativeType%5D=htmlDisplay"]){ + [self.eventList addObject:@"creativeType=htmlDisplay"]; + } + if([absoluteURLText containsString:@"omidJsInfo%5D%5BserviceVersion"]){ + [self.eventList addObject:@"omidJsInfo=serviceVersion,omidImplementer:omsdk"]; + } + if([absoluteURLText containsString:@"app%5D%5BappId"]){ + [self.eventList addObject:@"app={appId,libraryVersion}"]; + } + if([absoluteURLText containsString:@"libraryVersion"]){ + [self.eventList addObject:@"verificationParameters=undefined"]; + } + + if([absoluteURLText containsString:@"accessMode%5D=limited"]){ + [self.eventList addObject:@"accessMode=limited"]; + } + } + }else if([absoluteURLText containsString:@"type=geometryChange"] && [absoluteURLText containsString:@"percentageInView%5D=100"]){ + + if( [self.uiTestList containsObject:@"Viewable100Percentage"]){ + [self.eventList addObject:@"percentageInView=100"]; + [self.eventList addObject:@"type=geometryChange"]; + } + } + + + else if([absoluteURLText containsString:@"type=sessionFinish&data=undefined"]){ + if( [self.uiTestList containsObject:@"SessionFinish"]){ + [self.eventList addObject:@"type=sessionFinish"]; + } + + + NSLog(@"%@",self.eventList); + } + + + + + }); +} + + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..ee60721be --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerAd/BannerAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..c32931387 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About BannerNativeAdViewabilityTrackerTestVC + Load BannerNativeAd Selected UI Testcase + To test OMID Events is fired by SDK + */ + +@interface BannerNativeAdViewabilityTrackerTestVC : UIViewController +// Used to set navigation bar title +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..03857f4d9 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.m @@ -0,0 +1,393 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "BannerNativeAdViewabilityTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "SDKValidationURLProtocol.h" +#import "NSURLRequest+HTTPBodyTesting.h" +#import "ANNativeAdResponse+PrivateMethods.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface BannerNativeAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} + +@property (weak, nonatomic) IBOutlet UIView *adView; + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; +@property (nonatomic,readwrite,strong) ANNativeAdRequest *nativeAdRequest; +@property (weak, nonatomic) ANNativeAdView *nativeAdView; +// TableView is used to list all the events fired and stored in Array eventList +@property (weak, nonatomic) IBOutlet UITableView *tableView; +// To Store list of tracker URL fired by the SDK +@property (strong, nonatomic) NSMutableArray *eventList; +// Used to store the list of argument passed by UI test ([NSProcessInfo processInfo].arguments) +@property (strong, nonatomic) NSArray *uiTestList; + +@end + +@implementation BannerNativeAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + +} +- (void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:true]; + + // store the list of argument passed by UI test by UI Test + self.uiTestList = [NSProcessInfo processInfo].arguments; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + int adWidth = 300; + int adHeight = 250; + isAdVisible = true; + + // We want to center our ad on the screen. + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + + // Needed for when we create our ad view. + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Prepair a banner Native ad view. + if( [self.uiTestList containsObject:BannerNativeViewabilityTrackerTest] || [self.uiTestList containsObject:BannerNativeRendererViewabilityTrackerTest] ){ + + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:BannerPlacementId adSize:size]; + self.banner.rootViewController = self; + self.banner.shouldAllowNativeDemand = YES; + self.banner.enableNativeRendering = YES; + self.banner.shouldAllowVideoDemand = NO; + self.banner.delegate = self; + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.adView addSubview:self.banner]; + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 0; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.banner.forceCreativeId = BannerForceCreativeId; + } + [self.banner loadAd]; + } + // Prepair a Native ad view. + else if([self.uiTestList containsObject:NativeViewabilityTrackerTest] ){ + self.nativeAdRequest= [[ANNativeAdRequest alloc] init]; + self.nativeAdRequest.placementId = NativePlacementId; + self.nativeAdRequest.gender = ANGenderMale; + self.nativeAdRequest.shouldLoadIconImage = YES; + self.nativeAdRequest.shouldLoadMainImage = YES; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.nativeAdRequest.forceCreativeId = NativeForceCreativeId; + } + self.nativeAdRequest.delegate = self; + [self.nativeAdRequest loadAd]; + } + + + [SDKValidationURLProtocol setDelegate:self]; + [NSURLProtocol registerClass:[SDKValidationURLProtocol class]]; + + self.eventList = [[NSMutableArray alloc] init]; + self.tableView.hidden = YES; + + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if( [self.uiTestList containsObject:BannerNativeRendererViewabilityTrackerTest] ){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeRendererAd"]; + }else{ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeAd"]; + } +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); + + // To Hide add after 2 second so that we can track the Viewablity zero + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; +} + +// To Hide/Show add after 2 second so that we can track the Viewablity 0% & 100% +-(void) hideShowAdAction { + + if( [self.uiTestList containsObject:BannerNativeViewabilityTrackerTest] || [self.uiTestList containsObject:NativeViewabilityTrackerTest] ){ + if(isAdVisible){ + self.nativeAdView.hidden = true; + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + }else{ + self.nativeAdView.hidden = false; + [NSTimer scheduledTimerWithTimeInterval:8.0 + target:self + selector:@selector(removeBannerNativeAdAction) + userInfo:nil + repeats:NO]; + } + }else if ( [self.uiTestList containsObject:BannerNativeRendererViewabilityTrackerTest]){ + if(isAdVisible){ + self.banner.hidden = true; + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + }else{ + self.banner.hidden = false; + [NSTimer scheduledTimerWithTimeInterval:8.0 + target:self + selector:@selector(removeBannerNativeAdAction) + userInfo:nil + repeats:NO]; + } + } + + isAdVisible = !isAdVisible; +} + +// Remove BannerNative and Native add to call session finish +- (void)removeBannerNativeAdAction { + + + if( [self.uiTestList containsObject:BannerNativeViewabilityTrackerTest] || [self.uiTestList containsObject:NativeViewabilityTrackerTest] ){ + + + dispatch_async(dispatch_get_main_queue(), ^{ + self.nativeAdView.hidden = YES; + self.adView.hidden = YES; + [self.nativeAdView removeFromSuperview]; + }); + + [self.nativeAdResponse unregisterViewFromTracking]; + self.nativeAdResponse.delegate = nil; + self.nativeAdResponse = nil; + self.nativeAdRequest.delegate = nil; + self.nativeAdRequest = nil; + + self.nativeAdView = nil; + }else if ( [self.uiTestList containsObject:BannerNativeRendererViewabilityTrackerTest]){ + dispatch_async(dispatch_get_main_queue(), ^{ + + [self.banner removeFromSuperview]; + self.banner = nil; + }); + + } + + double delayInSeconds = 2.0; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + self.tableView.hidden = NO; + [self.tableView reloadData]; + }); + + +} + + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)adRequest:(ANNativeAdRequest *)request didReceiveResponse:(ANNativeAdResponse *)response { + self.nativeAdResponse = response; + [self renderNativeAdResponse]; +} +- (void)ad:(id)loadInstance didReceiveNativeAd:(id)responseInstance{ + self.nativeAdResponse = (ANNativeAdResponse *)responseInstance; + [self renderNativeAdResponse]; + +} + +// renderNative AdResponse +-(void)renderNativeAdResponse{ + + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + self.nativeAdView = [array firstObject]; + self.nativeAdView.titleLabel.text = self.nativeAdResponse.title; + self.nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + self.nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + self.nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + self.nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + + [self.nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + + [self.adView addSubview:self.nativeAdView]; + + [self.nativeAdResponse registerViewForTracking:self.nativeAdView + withRootViewController:self + clickableViews:@[self.nativeAdView.callToActionButton,self.nativeAdView.mainImageView] + error:nil]; + + + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + +} + +# pragma mark - Intercept HTTP Request Callback +// didReceiveIABResponse : Will record and return the events fire by SDK +- (void)didReceiveIABResponse:(NSString *)response { + NSLog(@"OMID response %@",response); + + if([response containsString:@"OmidSupported%5Btrue%5D%22"]){ + if([self.uiTestList containsObject:@"OmidSupported"]){ + [self.eventList addObject:@"OmidSupported=true"]; + } + + + }else if([response containsString:@"type%22%3A%22sessionStart"]){ + if([self.uiTestList containsObject:@"SessionStart"]){ + [self.eventList addObject:@"sessionStart"]; + if([response containsString:@"accessMode%22%3A%22limited"]){ + [self.eventList addObject:@"accessMode=limited"]; + } + if([response containsString:@"mediaType%22%3A%22display"]){ + [self.eventList addObject:@"mediaType=display"]; + } + if([response containsString:@"partnerName%22%3A%22Appnexus"]){ + [self.eventList addObject:@"partnerName=Appnexus"]; + } + if([response containsString:@"creativeType%22%3A%22nativeDisplay"]){ + [self.eventList addObject:@"creativeType=nativeDisplay"]; + } + + } + } + + else if ([response containsString:@"type%22%3A%22loaded%22%2C%22data%22%3A%7B%22impressionType%22%3A%22viewable%22%2C%22mediaType%22%3A%22display%22%2C%22creativeType%22%3A%22nativeDisplay%22%7D%7D"]){ + if([self.uiTestList containsObject:@"TypeLoaded"]){ + [self.eventList addObject:@"type=loaded"]; + [self.eventList addObject:@"impressionType=viewable"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=nativeDisplay"]; + } + + } + else if([response containsString:@"percentageInView%22%3A0"]){ + + if([self.uiTestList containsObject:@"OmidPercentageInView0"]){ + + [self.eventList addObject:@"percentageInView=0"]; + } + } + + else if([response containsString:@"percentageInView%22%3A1"] || [response containsString:@"percentageInView%22%3A2"] || [response containsString:@"percentageInView%22%3A3"] || [response containsString:@"percentageInView%22%3A4"] ||[response containsString:@"percentageInView%22%3A5"] || [response containsString:@"percentageInView%22%3A6"] || [response containsString:@"percentageInView%22%3A7"] ||[response containsString:@"percentageInView%22%3A8"] || [response containsString:@"percentageInView%22%3A9"]){ + if([self.uiTestList containsObject:@"OmidPercentageInView100"]){ + [self.eventList addObject:@"percentageInView=MoreThan0"]; + } + } + + + else if([response containsString:@"type%22%3A%22sessionFinish%22%7D"]){ + + if([self.uiTestList containsObject:@"SessionFinish"]){ + [self.eventList addObject:@"type=sessionFinish"]; + } + } + +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..5965a3ea7 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeAd/BannerNativeAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAd.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAd.storyboard new file mode 100644 index 000000000..f8183191b --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAd.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.h new file mode 100644 index 000000000..2ab1c17ec --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.h @@ -0,0 +1,22 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@interface BannerAdViewController : UIViewController + +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.m new file mode 100644 index 000000000..adf760b87 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerNativeRendererAd/BannerAdViewController.m @@ -0,0 +1,163 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "BannerAdViewController.h" +#import "ANBannerAdView.h" +#import "ANGlobal.h" +#import "ANStubManager.h" +#import "ANNativeAdView.h" +@interface BannerAdViewController () + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; + + +@end + +@implementation BannerAdViewController + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + [self prepareStubbing]; + + int adWidth = 300; + int adHeight = 250; + NSString *adID = @"15215010"; + + // We want to center our ad on the screen. + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + + // Needed for when we create our ad view. + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Make a banner ad view. + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:adID adSize:size]; + self.banner.rootViewController = self; + self.banner.shouldAllowNativeDemand = YES; + self.banner.enableNativeRendering = YES; + self.banner.shouldAllowVideoDemand = YES; + self.banner.delegate = self; + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.view addSubview:self.banner]; + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 10; + [self.banner loadAd]; +} + +-(void)prepareStubbing{ + + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if([self.adType isEqualToString:@"Banner"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerAd"]; + }else if([self.adType isEqualToString:@"BannerNative"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeAd"]; + }else if([self.adType isEqualToString:@"BannerNativeRenderer"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeRendererAd"]; + }else if([self.adType isEqualToString:@"BannerVideo"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerVideoAd"]; + }else if([self.adType isEqualToString:@"BannerAdAdmob"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"CSMBannerAd"]; + } + +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)ad:(id)loadInstance didReceiveNativeAd:(id)responseInstance{ + self.nativeAdResponse = (ANNativeAdResponse *)responseInstance; + + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + ANNativeAdView *nativeAdView = [array firstObject]; + nativeAdView.titleLabel.text = self.nativeAdResponse.title; + nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + + [nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + + [self.view addSubview:nativeAdView]; + + [self.nativeAdResponse registerViewForTracking:nativeAdView + withRootViewController:self + clickableViews:@[nativeAdView.callToActionButton,nativeAdView.mainImageView] + error:nil]; +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing + +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + if([absoluteURLText containsString:@"https://pagead2.googlesyndication.com/pcs/activeview?"]){ + self.impressionTracker.text = @"CSMImpressionTracker"; + }else if([absoluteURLText containsString:@"https://googleads.g.doubleclick.net/pagead/conversion/?ai"]){ + self.clickTracker.text = @"CSMClickTracker"; + }else if([absoluteURLText containsString:@"https://sin1-mobile.adnxs.com/click?"] || [absoluteURLText containsString:@"http://nym1-ib.adnxs.com/click?"] || [absoluteURLText containsString:@"https://wiki.xandr.com/"] || [absoluteURLText containsString:@"https://nym1-mobile.adnxs.com/click?"] ){ + self.clickTracker.text = @"ClickTracker"; + } + + if([absoluteURLText containsString:@"https://sin1-mobile.adnxs.com/it?an_audit=0&referrer=itunes.apple"] || [absoluteURLText containsString:@"http://nym1-ib.adnxs.com/it?"] ||[absoluteURLText containsString:@"https://nym1-mobile.adnxs.com/it?"] ){ + self.impressionTracker.text = @"ImpressionTracker"; + } + }); +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..dd5b8cc7e --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About BannerVideoAdViewabilityTrackerTestVC + Load BannerVideoAd Selected UI Testcase + To test OMID Events is fired by SDK + */ + +@interface BannerVideoAdViewabilityTrackerTestVC : UIViewController +// Used to set navigation bar title +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..20363f67a --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.m @@ -0,0 +1,388 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "BannerVideoAdViewabilityTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" +@interface BannerVideoAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; + +@property (weak, nonatomic) IBOutlet UITableView *tableView; + +@property (strong, nonatomic) NSMutableArray *eventList; +@property (strong, nonatomic) NSArray *uiTestList; + +@end + +@implementation BannerVideoAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + + // store the list of argument passed by UI test by UI Test + self.uiTestList = [NSProcessInfo processInfo].arguments; + + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + isAdVisible = true; + + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + int adWidth = 300; + int adHeight = 250; + + // We want to center our ad on the screen. + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + + // Needed for when we create our ad view. + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Make a banner ad view. + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:VideoPlacementId adSize:size]; + self.banner.rootViewController = self; + self.banner.shouldAllowNativeDemand = NO; + self.banner.enableNativeRendering = NO; + self.banner.shouldAllowVideoDemand = YES; + self.banner.shouldAllowBannerDemand = NO; + self.banner.delegate = self; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.banner.forceCreativeId = VideoForceCreativeId; + } + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.view addSubview:self.banner]; + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 0; + self.eventList = [[NSMutableArray alloc] init]; + self.tableView.hidden = YES; + + [self.banner loadAd]; +} + +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +- (void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:true]; + +} +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if( [self.uiTestList containsObject:BannerVideoViewabilityTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"OMID_VideoAd"]; + } + +} + + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); + // To Hide add after 2 second so that we can track the Viewablity zero + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; +} + +// To Hide/Show add after 2 second so that we can track the Viewablity 0% & 100% +-(void) hideShowAdAction { + + if( [self.uiTestList containsObject:BannerVideoViewabilityTrackerTest] ){ + if(isAdVisible){ + self.banner.hidden = true; + [NSTimer scheduledTimerWithTimeInterval:5.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + }else{ + self.banner.hidden = false; + } + } + isAdVisible = !isAdVisible; +} + + + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + + if([absoluteURLText containsString:@"version=1.0.2-dev"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"version=1.0.2-dev"]; + [self bannerVideoAdTestCompletionAction]; + + } + }else if([absoluteURLText containsString:@"supported=yes"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"supported=yes"]; + [self bannerVideoAdTestCompletionAction]; + + } + }else if([absoluteURLText containsString:@"type=sessionStart&data%5Bcontext%5D%5BapiVersion%5D=1.0&data%5Bcontext%5D%5BaccessMode%5D=limited&data%5Bcontext%5D%5Benvironment%5D=app&data%5Bcontext%5D%5BomidJsInfo%5D%5BomidImplementer%5D=omsdk&data%5Bcontext%5D%5BomidJsInfo%5D%5BserviceVersion%5D=1.3.7-iab2228&data%5Bcontext%5D%5BomidJsInfo%5D%5BsessionClientVersion%5D=1.3.7-iab2228&data%5Bcontext%5D%5BomidJsInfo%5D%5BpartnerName%5D=Appnexus"]){ + + + + if( [[NSProcessInfo processInfo].arguments containsObject:@"SessionStart"]){ + + [self.eventList addObject:@"sessionStart"]; + [self.eventList addObject:@"partnerName=Appnexus"]; + [self.eventList addObject:@"omidImplementer=omsdk"]; + [self.eventList addObject:@"accessMode=limited"]; + [self.eventList addObject:@"partnerVersion"]; + [self.eventList addObject:@"supports=[clid,vlid]"]; + [self.eventList addObject:@"adSessionType=html"]; + [self.eventList addObject:@"impressionType=definedByJavaScript"]; + [self.eventList addObject:@"mediaType=video"]; + [self.eventList addObject:@"creativeType=definedByJavaScript"]; + [self.eventList addObject:@"supportsLoadedEvent=true"]; + [self.eventList addObject:@"verificationParameters=iabtechlab-appnexus"]; + [self.eventList addObject:@"deviceInfo=iOS"]; + [self.eventList addObject:@"environment=app"]; + + [self bannerVideoAdTestCompletionAction]; + + + } + + }else if([absoluteURLText containsString:@"percentageInView%5D=0"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OmidPercentageInView"]){ + [self.eventList addObject:@"percentageInView=0"]; + if([self eventCount] == 2){ + [self bannerVideoAdTestCompletionAction]; + } + } + }else if([absoluteURLText containsString:@"type=loaded"] || + [absoluteURLText containsString:@"skippable%5D%5Benabled"] || + [absoluteURLText containsString:@"autoPlay%5D=true"] || + [absoluteURLText containsString:@"position%5D=In-Banner"] || + [absoluteURLText containsString:@"skipOffset%5D=0"] || + [absoluteURLText containsString:@"impressionType%5D=beginToRender"] || + [absoluteURLText containsString:@"creativeType%5D=video"] || + [absoluteURLText containsString:@"BmediaType%5D=video"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + [self.eventList addObject:@"type=loaded"]; + [self.eventList addObject:@"skippable=false"]; + [self.eventList addObject:@"position=In-Banner"]; + [self.eventList addObject:@"autoPlay=true"]; + [self.eventList addObject:@"impressionType=beginToRender"]; + [self.eventList addObject:@"mediaType=video"]; + [self.eventList addObject:@"creativeType=video"]; + } + + } + + // Next + else if([absoluteURLText containsString:@"type=start"] && [absoluteURLText containsString:@"duration%5D=32.23"] && [absoluteURLText containsString:@"mediaPlayerVolume%5D=1"]&& [absoluteURLText containsString:@"deviceVolum"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=1"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + + + [self.eventList addObject:@"type=start"]; + [self.eventList addObject:@"duration=32.23"]; + [self.eventList addObject:@"mediaPlayerVolume=1"]; + [self.eventList addObject:@"deviceVolume"]; + [self.eventList addObject:@"videoPlayerVolume"]; + } + + } + else if([absoluteURLText containsString:@"type=volumeChange"] && [absoluteURLText containsString:@"mediaPlayerVolume%5D=1"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=1"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDVolumeChange"]){ + + + [self.eventList addObject:@"type=volumeChange"]; + [self.eventList addObject:@"mediaPlayerVolume=1"]; + [self.eventList addObject:@"videoPlayerVolume =1"]; + + } + + + } + else if([absoluteURLText containsString:@"type=volumeChange"] && [absoluteURLText containsString:@"mediaPlayerVolume%5D=0"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=0"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDVolumeChange"]){ + [self.eventList addObject:@"type=volumeChange"]; + [self.eventList addObject:@"mediaPlayerVolume=0"]; + [self.eventList addObject:@"videoPlayerVolume =0"]; + } + } + else if([absoluteURLText containsString:@"type=impression&data%5BimpressionType%5D=beginToRender&data%5BmediaType%5D=video&data%5BcreativeType%5D=video"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + [self.eventList addObject:@"type=impression"]; + [self.eventList addObject:@"impressionType=beginToRender"]; + [self.eventList addObject:@"creativeType=video"]; + [self.eventList addObject:@"mediaType=video"]; + } + } + else if([absoluteURLText containsString:@"type=playerStateChange&data%5Bstate%5D=fullscreen"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + + [self.eventList addObject:@"type=playerStateChange state=fullscreen"]; + } + } + else if([absoluteURLText containsString:@"type=pause&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + + [self.eventList addObject:@"type=pause"]; + } + } + else if([absoluteURLText containsString:@"type=resume&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + [self.eventList addObject:@"type=resume"]; + } + } + else if([absoluteURLText containsString:@"percentageInView%5D=100"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OmidPercentageInView"]){ + [self.eventList addObject:@"percentageInView=100"]; + if([self eventCount] == 2){ + [self bannerVideoAdTestCompletionAction]; + } + } + } + else if([absoluteURLText containsString:@"type=firstQuartile&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + [self.eventList addObject:@"type=firstQuartile"]; + } + } + else if([absoluteURLText containsString:@"type=playerStateChange&data%5Bstate%5D=normal"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + + [self.eventList addObject:@"type=playerStateChange state=normal"]; + + } + + } + else if([absoluteURLText containsString:@"type=midpoint&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + [self.eventList addObject:@"type=midpoint"]; + } + } + else if([absoluteURLText containsString:@"type=thirdQuartile&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + + [self.eventList addObject:@"type=thirdQuartile"]; + } + } + else if([absoluteURLText containsString:@"type=complete&data=undefined"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + + [self.eventList addObject:@"type=complete"]; + } + [self bannerVideoAdTestCompletionAction]; + + + } + else if([absoluteURLText containsString:@"type=sessionFinish&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SessionFinish"]){ + [self.eventList addObject:@"type=sessionFinish"]; + } + [self bannerVideoAdTestCompletionAction]; + } + }); +} + +-(int)eventCount{ + NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:self.eventList]; + self.eventList = [[orderedSet array] mutableCopy]; + return self.eventList.count; +} + +// bannerVideoAdTestCompletionAction: Called when SDK capture the needed URL +- (void)bannerVideoAdTestCompletionAction{ + NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:self.eventList]; + self.eventList = [[orderedSet array] mutableCopy]; + [self.tableView reloadData]; + self.tableView.hidden = NO; + [self.banner removeFromSuperview]; + self.banner = nil; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..e1a566853 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityBannerVideoAd/BannerVideoAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..66cc23381 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About InterstitialAdViewabilityTrackerTestVC + Load InterstitialAd Selected UI Testcase + To test OMID Events is fired by SDK + */ + +@interface InterstitialAdViewabilityTrackerTestVC : UIViewController +// Used to set navigation bar title +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..1bc05a1ef --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.m @@ -0,0 +1,243 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "InterstitialAdViewabilityTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface InterstitialAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} +@property (nonatomic, readwrite, strong) ANInterstitialAd *interstitialAd; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (strong, nonatomic) NSMutableArray *eventList; +@property (strong, nonatomic) NSArray *uiTestList; +@end + +@implementation InterstitialAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + // store the list of argument passed by UI test by UI Test + self.uiTestList = [NSProcessInfo processInfo].arguments; + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + isAdVisible = true; + + // Make a banner ad view. + self.interstitialAd = [[ANInterstitialAd alloc] initWithPlacementId:BannerPlacementId]; + self.interstitialAd.delegate = self; + self.interstitialAd.clickThroughAction = ANClickThroughActionReturnURL; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.interstitialAd.forceCreativeId = BannerForceCreativeId; + } + [self.interstitialAd loadAd]; + self.eventList = [[NSMutableArray alloc] init]; + self.tableView.hidden = YES; + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if( [self.uiTestList containsObject:InterstitialViewabilityTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"OMID_BannerAd"]; + } + [[ANStubManager sharedInstance] stubRequestWithResponse:@"OMID_BannerAd"]; +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); + [self.interstitialAd displayAdFromViewController:self autoDismissDelay:10]; +} +- (void)adDidClose:(id)ad{ + [self removeInterstitialAdAdAction]; +} + + + +- (void)removeInterstitialAdAdAction { + self.interstitialAd = nil; + + double delayInSeconds = 2.0; + dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); + dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + self.tableView.hidden = NO; + [self.tableView reloadData]; + }); + + +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + + if([absoluteURLText containsString:@"https://complianceomsdk.iabtechlab.com/omsdk/sendmessage?version=1.0.2-dev"]){ + if( [self.uiTestList containsObject:@"VersionEvent"]){ + [self.eventList addObject:@"version=1.0.2-dev"]; + } + }else if([absoluteURLText containsString:@"https://complianceomsdk.iabtechlab.com/omsdk/sendmessage?supported=yes"]){ + + if( [self.uiTestList containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"supported=yes"]; + } + }else if([absoluteURLText containsString:@"percentageInView%5D=0"]){ + + if( [self.uiTestList containsObject:@"Viewable0Percentage"]){ + [self.eventList addObject:@"percentageInView=0"]; + [self.eventList addObject:@"type=geometryChange"]; + } + + + }else if([absoluteURLText containsString:@"type=impression&data%5BimpressionType%5D=viewable&data%5BmediaType%5D=display&data%5BcreativeType%5D=htmlDisplay"]){ + + if( [self.uiTestList containsObject:@"TypeImpression"]){ + [self.eventList addObject:@"type=impression"]; + [self.eventList addObject:@"impressionType=viewable"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=htmlDisplay"]; + } + + }else if( [self.uiTestList containsObject:@"SessionStart"]){ + + + [self.eventList addObject:@"sessionStart"]; + if([absoluteURLText containsString:@"environment%5D=app"]){ + [self.eventList addObject:@"environment=app"]; + } + if([absoluteURLText containsString:@"adSessionType%5D=html"]){ + [self.eventList addObject:@"adSessionType=html"]; + } + if([absoluteURLText containsString:@"supports%5D%5B0%5D=clid&data%5Bcontext%5D%5Bsupports%5D%5B1%5D=vlid"]){ + [self.eventList addObject:@"supports=[clid,vlid]"]; + } + if([absoluteURLText containsString:@"mediaType%5D=display"]){ + [self.eventList addObject:@"mediaType=display"]; + } + if([absoluteURLText containsString:@"partnerName%5D=Appnexus"]){ + [self.eventList addObject:@"partnerName=Appnexus"]; + } + if([absoluteURLText containsString:@"deviceInfo%5D%5BdeviceType"]){ + [self.eventList addObject:@"deviceInfo=iOS"]; + } + if([absoluteURLText containsString:@"impressionType%5D=viewable"]){ + [self.eventList addObject:@"impressionType=viewable"]; + } + if([absoluteURLText containsString:@"creativeType%5D=htmlDisplay"]){ + [self.eventList addObject:@"creativeType=htmlDisplay"]; + } + if([absoluteURLText containsString:@"omidJsInfo%5D%5BserviceVersion"]){ + [self.eventList addObject:@"omidJsInfo=serviceVersion,omidImplementer:omsdk"]; + } + if([absoluteURLText containsString:@"app%5D%5BappId"]){ + [self.eventList addObject:@"app={appId,libraryVersion}"]; + } + if([absoluteURLText containsString:@"libraryVersion"]){ + [self.eventList addObject:@"verificationParameters=undefined"]; + } + + if([absoluteURLText containsString:@"accessMode%5D=limited"]){ + [self.eventList addObject:@"accessMode=limited"]; + } + + }else if( [absoluteURLText containsString:@"percentageInView%5D=100"]){ + if( [self.uiTestList containsObject:@"Viewable100Percentage"]){ + [self.eventList addObject:@"percentageInView=100"]; + [self.eventList addObject:@"type=geometryChange"]; + } + } + + + else if([absoluteURLText containsString:@"type=sessionFinish"]){ + [self.eventList addObject:@"type=sessionFinish"]; + NSLog(@"%@",self.eventList); + } + + + + + }); +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..16cd7d66b --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityInterstitialAd/InterstitialAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.h new file mode 100644 index 000000000..619b6ead2 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.h @@ -0,0 +1,26 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@interface ANNativeAdView : UIView +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; +@property (weak, nonatomic) IBOutlet UILabel *bodyLabel; +@property (weak, nonatomic) IBOutlet UIImageView *iconImageView; +@property (weak, nonatomic) IBOutlet UIImageView *mainImageView; +@property (weak, nonatomic) IBOutlet UIButton *callToActionButton; +@property (weak, nonatomic) IBOutlet UILabel *sponsoredLabel; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.m new file mode 100644 index 000000000..ebf4f3a85 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.m @@ -0,0 +1,20 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "ANNativeAdView.h" + +@implementation ANNativeAdView + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.xib b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.xib new file mode 100644 index 000000000..6b882eeed --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/ANNativeAdView.xib @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..683092a45 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.h @@ -0,0 +1,22 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +@interface NativeAdViewabilityTrackerTestVC : UIViewController + + +@end + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..514b0664b --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.m @@ -0,0 +1,314 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "ViewabilityBannerNativeAdViewController.h" +#import +#import "ANStubManager.h" +#import "ANNativeAdView.h" +#import "SDKValidationURLProtocol.h" +#import "NSURLRequest+HTTPBodyTesting.h" +#import "ANNativeAdResponse+PrivateMethods.h" +#import "Constant.h" + +@interface NativeAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} + + +@property (nonatomic, readwrite, strong) ANBannerAdView *banner; +@property (weak, nonatomic) IBOutlet UILabel *impressionTracker; +@property (weak, nonatomic) IBOutlet UILabel *clickTracker; +@property (nonatomic,readwrite,strong) ANNativeAdResponse *nativeAdResponse; +@property (nonatomic,readwrite,strong) ANNativeAdRequest *nativeAdRequest; +@property (weak, nonatomic) ANNativeAdView *nativeAdView; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (strong, nonatomic) NSMutableArray *eventList; + +@end + +@implementation NativeAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + if(MockTestcase){ + [self prepareStubbing]; + } + + int adWidth = 300; + int adHeight = 250; + NSString *adID = @"15215010"; + isAdVisible = true; + + // We want to center our ad on the screen. + CGRect screenRect = [[UIScreen mainScreen] bounds]; + CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2); + CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2); + + // Needed for when we create our ad view. + CGRect rect = CGRectMake(originX, originY, adWidth, adHeight); + CGSize size = CGSizeMake(adWidth, adHeight); + + // Make a banner ad view. + + if([self.adType isEqual:@"ViewabilityBannerNative"] || [self.adType isEqualToString:@"ViewabilityBannerNativeRenderer"]){ + self.banner = [ANBannerAdView adViewWithFrame:rect placementId:adID adSize:size]; + self.banner.rootViewController = self; + self.banner.shouldAllowNativeDemand = YES; + self.banner.enableNativeRendering = YES; + self.banner.shouldAllowVideoDemand = NO; + self.banner.delegate = self; + self.banner.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.banner.accessibilityIdentifier = @"bannerAdElements"; + [self.view addSubview:self.banner]; + self.banner.shouldServePublicServiceAnnouncements = NO; + self.banner.autoRefreshInterval = 0; + [self.banner loadAd]; + }else if([self.adType isEqual:@"ViewabilityNative"]){ + + self.nativeAdRequest= [[ANNativeAdRequest alloc] init]; + self.nativeAdRequest.placementId = @"19212468"; + self.nativeAdRequest.gender = ANGenderMale; + self.nativeAdRequest.shouldLoadIconImage = YES; + self.nativeAdRequest.shouldLoadMainImage = YES; + self.nativeAdRequest.delegate = self; + [self.nativeAdRequest loadAd]; + } + + [SDKValidationURLProtocol setDelegate:self]; + [NSURLProtocol registerClass:[SDKValidationURLProtocol class]]; + self.eventList = [[NSMutableArray alloc] init]; + self.tableView.hidden = YES; + + +} + +-(void)prepareStubbing{ + + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if([self.adType isEqualToString:@"ViewabilityBannerNative"] || [self.adType isEqualToString:@"ViewabilityNative"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeAd"]; + }else if ([self.adType isEqualToString:@"ViewabilityBannerNativeRenderer"]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"RTBBannerNativeRendererAd"]; + + } +} + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)adRequest:(ANNativeAdRequest *)request didReceiveResponse:(ANNativeAdResponse *)response { + self.nativeAdResponse = response; + [self renderNativeAdResponse]; +} +- (void)ad:(id)loadInstance didReceiveNativeAd:(id)responseInstance{ + self.nativeAdResponse = (ANNativeAdResponse *)responseInstance; + [self renderNativeAdResponse]; + +} + +-(void)renderNativeAdResponse{ + + UINib *adNib = [UINib nibWithNibName:@"ANNativeAdView" bundle:[NSBundle mainBundle]]; + NSArray *array = [adNib instantiateWithOwner:self options:nil]; + self.nativeAdView = [array firstObject]; + self.nativeAdView.titleLabel.text = self.nativeAdResponse.title; + self.nativeAdView.bodyLabel.text = self.nativeAdResponse.body; + self.nativeAdView.iconImageView.image = self.nativeAdResponse.iconImage; + self.nativeAdView.mainImageView.image = self.nativeAdResponse.mainImage; + self.nativeAdView.sponsoredLabel.text = self.nativeAdResponse.sponsoredBy; + + [self.nativeAdView.callToActionButton setTitle:self.nativeAdResponse.callToAction forState:UIControlStateNormal]; + self.nativeAdResponse.delegate = self; + self.nativeAdResponse.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + + [self.view addSubview:self.nativeAdView]; + + [self.nativeAdResponse registerViewForTracking:self.nativeAdView + withRootViewController:self + clickableViews:@[self.nativeAdView.callToActionButton,self.nativeAdView.mainImageView] + error:nil]; +} + +- (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(nonnull NSError *)error withAdResponseInfo:(nullable ANAdResponseInfo *)adResponseInfo { + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing + +- (void) updateNetworkLog:(NSNotification *) notification +{ + // NSDictionary *userInfo = notification.userInfo; + // NSURLResponse *response = [userInfo objectForKey:@"response"]; + // dispatch_async(dispatch_get_main_queue(), ^{ + // NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + // NSLog(@"absoluteURLText -> %@",absoluteURLText); + // + // }); +} + +# pragma mark - Intercept HTTP Request Callback + +- (void)didReceiveIABResponse:(NSString *)response { + NSLog(@"OMID response %@",response); + + if([response containsString:@"OmidSupported%5Btrue%5D%22"]){ + [self.eventList addObject:@"OmidSupported=true"]; + }else if([response containsString:@"type%22%3A%22sessionStart%22%2C%22data%22%3A%7B%22context%22%3A%7B%22apiVersion%22%3A%221.0%22%2C%22accessMode%22%3A%22limited%22%2C%22environment%22%3A%22app%22%2C%22omidJsInfo%22%3A%7B%22omidImplementer%22%3A%22omsdk%22%2C%22serviceVersion%22%3A%221.3.7-iab2228%22%7D%2C%22omidNativeInfo%22%3A%7B%22partnerName%22%3A%22Appnexus%22%2C%22partnerVersion%22%3A%227.8%22%7D%2C%22adSessionType%22%3A%22native%22%2C%22app%22%3A%7B%22appId%22%3A%22com.xandr.SimpleIntegration%22%2C%22libraryVersion%22%3A%221.3.7-Appnexus%22%7D%2C%22deviceInfo%22%3A%7B%22deviceType%22%3A%22x86_64%22%2C%22os%22%3A%22iOS%22%2C%22osVersion%22%3A%2214.1%22%7D%2C%22supports%22%3A%5B%22clid%22%2C%22vlid%22%5D%7D%2C%22impressionType%22%3A%22viewable%22%2C%22mediaType%22%3A%22display%22%2C%22creativeType%22%3A%22nativeDisplay%22%2C%22supportsLoadedEvent%22%3Atrue%2C%22pageUrl%22%3Anull%2C%22contentUrl%22%3Anull%7D%7D"]){ + + + + + + [self.eventList addObject:@"sessionStart"]; + [self.eventList addObject:@"accessMode=limited"]; + [self.eventList addObject:@"partnerName=Appnexus"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=nativeDisplay"]; + } + + else if ([response containsString:@"type%22%3A%22loaded%22%2C%22data%22%3A%7B%22impressionType%22%3A%22viewable%22%2C%22mediaType%22%3A%22display%22%2C%22creativeType%22%3A%22nativeDisplay%22%7D%7D"]){ + + [self.eventList addObject:@"type=loaded"]; + [self.eventList addObject:@"impressionType=viewable"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=nativeDisplay"]; + + } + else if([response containsString:@"type%22%3A%22geometryChange%22%2C%22data%22%3A%7B%22viewport%22%3A%7B%22width%22%3A390%2C%22height%22%3A844%7D%2C%22adView%22%3A%7B%22percentageInView%22%3A77%2C%22reasons%22%3A%5B%22obstructed%22%5D%2C%22geometry%22%3A%7B%22width%22%3A320%2C%22height%22%3A400%2C%22x%22%3A0%2C%22y%22%3A0%2C%22pixels%22%3A128000%7D%2C%22onScreenGeometry%22%3A%7B%22width%22%3A320%2C%22height%22%3A400%2C%22x%22%3A0%2C%22y%22%3A0%2C%22pixels%22%3A98880%2C%22obstructions%22%3A%5B%7B%22width%22%3A390%2C%22height%22%3A91%2C%22x%22%3A0%2C%22y%22%3A0%7D%2C%7B%22width%22%3A390%2C%22height%22%3A0.3333333333333286%2C%22x%22%3A0%2C%22y%22%3A91%7D%2C%7B%22width%22%3A390%2C%22height%22%3A44%2C%22x%22%3A0%2C%22y%22%3A47%7D%5D%2C%22friendlyObstructions%22%3A%5B%5D%7D%7D%2C%22declaredFriendlyObstructions%22%3A0%7D%7D"]){ + + [self.eventList addObject:@"impressionType=viewable"]; + [self.eventList addObject:@"mediaType=display"]; + [self.eventList addObject:@"creativeType=nativeDisplay"]; + + } + else if([response containsString:@"type%22%3A%22geometryChange%22%2C%22data%22%3A%7B%22viewport%22%3A%7B%22width%22%3A390%2C%22height%22%3A844%7D%2C%22adView%22%3A%7B%22percentageInView%22%3A0%2C%22reasons%22%3A%5B%22hidden%22%5D%2C%22geometry%22%3A%7B%22width%22%3A320%2C%22height%22%3A400%2C%22x%22%3A0%2C%22y%22%3A0%2C%22pixels%22%3A128000%7D%2C%22onScreenGeometry%22%3A%7B%22width%22%3A0%2C%22height%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22pixels%22%3A0%2C%22obstructions%22%3A%5B%5D%2C%22friendlyObstructions%22%3A%5B%5D%7D%7D%2C%22declaredFriendlyObstructions%22%3A0%7D%7D"] || [response containsString:@"type%22%3A%22geometryChange%22%2C%22data%22%3A%7B%22viewport%22%3A%7B%22width%22%3A390%2C%22height%22%3A844%7D%2C%22adView%22%3A%7B%22percentageInView%22%3A0%2C%22reasons%22%3A%5B%22hidden%22%5D%2C%22geometry%22%3A%7B%22width%22%3A300%2C%22height%22%3A250%2C%22x%22%3A45%2C%22y%22%3A297%2C%22pixels%22%3A75000%7D%2C%22onScreenGeometry%22%3A%7B%22width%22%3A0%2C%22height%22%3A0%2C%22x%22%3A0%2C%22y%22%3A0%2C%22pixels%22%3A0%2C%22obstructions%22%3A%5B%5D%2C%22friendlyObstructions%22%3A%5B%5D%7D%7D%2C%22declaredFriendlyObstructions%22%3A0%7D%7D"]){ + + [self.eventList addObject:@"percentageInView=0"]; + } + + else if([response containsString:@"type%22%3A%22geometryChange%22%2C%22data%22%3A%7B%22viewport%22%3A%7B%22width%22%3A390%2C%22height%22%3A844%7D%2C%22adView%22%3A%7B%22percentageInView%22%3A100%2C%22reasons%22%3A%5B%5D%2C%22geometry%22%3A%7B%22width%22%3A300%2C%22height%22%3A250%2C%22x%22%3A45%2C%22y%22%3A297%2C%22pixels%22%3A75000%7D%2C%22onScreenGeometry%22%3A%7B%22width%22%3A300%2C%22height%22%3A250%2C%22x%22%3A45%2C%22y%22%3A297%2C%22pixels%22%3A75000%2C%22obstructions%22%3A%5B%5D%2C%22friendlyObstructions%22%3A%5B%5D%7D%7D%2C%22declaredFriendlyObstructions%22%3A0%7D%7D"] || [response containsString:@"type%22%3A%22impression%22%2C%22data%22%3A%7B%22viewport%22%3A%7B%22width%22%3A390%2C%22height%22%3A844%7D%2C%22adView%22%3A%7B%22percentageInView%22%3A100%2C%22reasons%22%3A%5B%5D%2C%22geometry%22%3A%7B%22width%22%3A300%2C%22height%22%3A250%2C%22x%22%3A45%2C%22y%22%3A297%2C%22pixels%22%3A75000%7D%2C%22onScreenGeometry%22%3A%7B%22width%22%3A300%2C%22height%22%3A250%2C%22x%22%3A45%2C%22y%22%3A297%2C%22pixels%22%3A75000%2C%22obstructions%22%3A%5B%5D%2C%22friendlyObstructions%22%3A%5B%5D%7D%7D%2C%22declaredFriendlyObstructions%22%3A0%2C%22impressionType%22%3A%22viewable%22%2C%22mediaType%22%3A%22display%22%2C%22creativeType%22%3A%22nativeDisplay%22%7D%7D"]){ + [self.eventList addObject:@"percentageInView=100"]; + } + + + else if([response containsString:@"type%22%3A%22sessionFinish%22%7D"]){ + + [self.eventList addObject:@"type=sessionFinish"]; + NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:self.eventList]; + self.eventList = [[orderedSet array] mutableCopy]; + + NSLog(@"OMID Summary %@",self.eventList); + dispatch_async(dispatch_get_main_queue(), ^{ + self.tableView.hidden = false; + [self.tableView reloadData]; + }); + + } + +} + +- (IBAction)removeBannerAdAction:(id)sender { + + + + + if([self.adType isEqualToString:@"ViewabilityBannerNative"] || [self.adType isEqualToString:@"ViewabilityNative"]){ + [self.nativeAdResponse unregisterViewFromTracking]; + self.nativeAdResponse.delegate = nil; + self.nativeAdResponse = nil; + + + self.nativeAdRequest.delegate = nil; + self.nativeAdRequest = nil; + + [self.nativeAdView removeFromSuperview]; + self.nativeAdView = nil; + }else if ([self.adType isEqualToString:@"ViewabilityBannerNativeRenderer"]){ + + [self.banner removeFromSuperview]; + self.banner = nil; + } + + +} +- (IBAction)hideShowAdAction:(id)sender { + + + + if([self.adType isEqualToString:@"ViewabilityBannerNative"] || [self.adType isEqualToString:@"ViewabilityNative"]){ + if(isAdVisible){ + self.nativeAdView.hidden = true; + }else{ + self.nativeAdView.hidden = false; + } + }else if ([self.adType isEqualToString:@"ViewabilityBannerNativeRenderer"]){ + if(isAdVisible){ + self.banner.hidden = true; + }else{ + self.banner.hidden = false; + } + } + + + + isAdVisible = !isAdVisible; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} +@end + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..297e91e9b --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityNativeAd/NativeAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.h b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.h new file mode 100644 index 000000000..8c7d5feaf --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.h @@ -0,0 +1,28 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +/* + About VideoAdViewabilityTrackerTestVC + Load VideoAd Selected UI Testcase + To test OMID Events is fired by SDK + */ + +@interface VideoAdViewabilityTrackerTestVC : UIViewController +// Used to set navigation bar title +@property (nonatomic, readwrite, strong) NSString *adType; + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.m b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.m new file mode 100644 index 000000000..d8d6cad90 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.m @@ -0,0 +1,349 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import +#import "VideoAdViewabilityTrackerTestVC.h" +#import +#import "ANStubManager.h" +#import "Constant.h" +#import "ANHTTPStubbingManager.h" + +@interface VideoAdViewabilityTrackerTestVC () { + BOOL isAdVisible; +} +@property (weak, nonatomic) IBOutlet UIView *videoPlayerAd; + +@property (nonatomic, readwrite, strong) ANInstreamVideoAd *videoAd; +@property (weak, nonatomic) IBOutlet UITableView *tableView; + +@property (strong, nonatomic) NSMutableArray *eventList; +@property (strong, nonatomic) NSArray *uiTestList; + +@end + +@implementation VideoAdViewabilityTrackerTestVC + +- (void)viewDidLoad +{ + + [super viewDidLoad]; + + // store the list of argument passed by UI test by UI Test + self.uiTestList = [NSProcessInfo processInfo].arguments; + + // MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing + if(MockTestcase){ + [self prepareStubbing]; + } else { + [[ANHTTPStubbingManager sharedStubbingManager] disable]; + [[ANHTTPStubbingManager sharedStubbingManager] removeAllStubs]; + [[ANStubManager sharedInstance] enableStubbing]; + [[ANStubManager sharedInstance] disableStubbing]; + } + isAdVisible = true; + // registerEventListener is used to register for tracking the URL fired by Application(or SDK) + [self registerEventListener]; + + + + // Make a banner ad view. + self.videoAd = [[ANInstreamVideoAd alloc] init]; + self.videoAd = [[ANInstreamVideoAd alloc] initWithPlacementId:VideoPlacementId]; + // Set Creative Id if ForceCreative is enabled + if(ForceCreative){ + self.videoAd.forceCreativeId = VideoForceCreativeId; + } + [self.videoAd loadAdWithDelegate:self]; + self.videoAd.clickThroughAction = ANClickThroughActionOpenSDKBrowser; + self.tableView.hidden = YES; + + self.eventList = [[NSMutableArray alloc] init]; + +} +// registerEventListener is used to register for tracking the URL fired by Application(or SDK) +-(void)registerEventListener{ + [NSURLProtocol registerClass:[WebKitURLProtocol class]]; + [NSURLProtocol wk_registerWithScheme:@"https"]; + [NSURLProtocol wk_registerWithScheme:@"http"]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateNetworkLog:) + name:@"didReceiveURLResponse" + object:nil]; +} +// prepareStubbing if MockTestcase is enabled(set to 1) prepare stubbing with mock response else disable stubbing +-(void)prepareStubbing{ + + self.title = self.adType; + [[ANStubManager sharedInstance] disableStubbing]; + [[ANStubManager sharedInstance] enableStubbing]; + + if( [self.uiTestList containsObject:VideoViewabilityTrackerTest]){ + [[ANStubManager sharedInstance] stubRequestWithResponse:@"OMID_VideoAd"]; + } + + +} + + +- (void)adDidReceiveAd:(id)ad { + NSLog(@"Ad did receive ad"); + [self.videoAd playAdWithContainer:self.videoPlayerAd withDelegate:self]; + // To Hide add after 2 second so that we can track the Viewablity zero + [NSTimer scheduledTimerWithTimeInterval:2.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; +} + +// To Hide/Show add after 2 second so that we can track the Viewablity 0% & 100% +-(void) hideShowAdAction { + + if( [self.uiTestList containsObject:VideoViewabilityTrackerTest] ){ + if(isAdVisible){ + self.videoPlayerAd.hidden = true; + [NSTimer scheduledTimerWithTimeInterval:5.0 + target:self + selector:@selector(hideShowAdAction) + userInfo:nil + repeats:NO]; + }else{ + self.videoPlayerAd.hidden = false; + } + } + isAdVisible = !isAdVisible; +} + +-(void)ad:(id)ad requestFailedWithError:(NSError *)error{ + NSLog(@"Ad request Failed With Error"); +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +# pragma mark - Ad Server Response Stubbing +// updateNetworkLog: Will return event in fire of URL from Application(or SDK) +- (void) updateNetworkLog:(NSNotification *) notification +{ + NSDictionary *userInfo = notification.userInfo; + NSURLResponse *response = [userInfo objectForKey:@"response"]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSString *absoluteURLText = [response.URL.absoluteURL absoluteString]; + NSLog(@"absoluteURLText -> %@",absoluteURLText); + + + if([absoluteURLText containsString:@"version=1.0.2-dev"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"version=1.0.2-dev"]; + } + }else if([absoluteURLText containsString:@"supported=yes"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SupportedIsYes"]){ + [self.eventList addObject:@"supported=yes"]; + } + + }else if([absoluteURLText containsString:@"type=sessionStart&data%5Bcontext%5D%5BapiVersion%5D=1.0&data%5Bcontext%5D%5BaccessMode%5D=limited&data%5Bcontext%5D%5Benvironment%5D=app&data%5Bcontext%5D%5BomidJsInfo%5D%5BomidImplementer%5D=omsdk&data%5Bcontext%5D%5BomidJsInfo%5D%5BserviceVersion%5D=1.3.7-iab2228&data%5Bcontext%5D%5BomidJsInfo%5D%5BsessionClientVersion%5D=1.3.7-iab2228&data%5Bcontext%5D%5BomidJsInfo%5D%5BpartnerName%5D=Appnexus"]){ + + + + if( [[NSProcessInfo processInfo].arguments containsObject:@"SessionStart"]){ + + [self.eventList addObject:@"sessionStart"]; + [self.eventList addObject:@"partnerName=Appnexus"]; + [self.eventList addObject:@"omidImplementer=omsdk"]; + [self.eventList addObject:@"accessMode=limited"]; + [self.eventList addObject:@"partnerVersion"]; + [self.eventList addObject:@"supports=[clid,vlid]"]; + [self.eventList addObject:@"adSessionType=html"]; + [self.eventList addObject:@"impressionType=definedByJavaScript"]; + [self.eventList addObject:@"mediaType=video"]; + [self.eventList addObject:@"creativeType=definedByJavaScript"]; + [self.eventList addObject:@"supportsLoadedEvent=true"]; + [self.eventList addObject:@"verificationParameters=iabtechlab-appnexus"]; + [self.eventList addObject:@"deviceInfo=iOS"]; + [self.eventList addObject:@"environment=app"]; + [self videoAdTestCompletionAction]; + } + + + + }else if([absoluteURLText containsString:@"percentageInView%5D=0"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OmidPercentageInView"]){ + + [self.eventList addObject:@"percentageInView=0"]; + } + + }else if([absoluteURLText containsString:@"type=loaded&data%5Bskippable%5D=true&data%5BautoPlay%5D=true&data%5Bposition%5D=In-Video&data%5BskipOffset%5D=0&data%5BimpressionType%5D=beginToRender&data%5BmediaType%5D=video&data%5BcreativeType%5D=video"]){ + + + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + [self.eventList addObject:@"type=loaded"]; + [self.eventList addObject:@"skippable=true"]; + [self.eventList addObject:@"position=In-Video"]; + [self.eventList addObject:@"autoPlay=true"]; + [self.eventList addObject:@"impressionType=beginToRender"]; + [self.eventList addObject:@"mediaType=video"]; + [self.eventList addObject:@"creativeType=video"]; + } + + } + + // Next + + else if([absoluteURLText containsString:@"type=start"] && [absoluteURLText containsString:@"duration%5D=32.23"] && [absoluteURLText containsString:@"mediaPlayerVolume%5D=1"]&& [absoluteURLText containsString:@"deviceVolume"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=1"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + [self.eventList addObject:@"type=start"]; + [self.eventList addObject:@"duration=32.23"]; + [self.eventList addObject:@"mediaPlayerVolume=1"]; + [self.eventList addObject:@"deviceVolume"]; + [self.eventList addObject:@"videoPlayerVolume"]; + } + + } + else if([absoluteURLText containsString:@"type=volumeChange"] && [absoluteURLText containsString:@"mediaPlayerVolume%5D=1"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=1"]){ + + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDVolumeChange"]){ + + + [self.eventList addObject:@"type=volumeChange"]; + [self.eventList addObject:@"mediaPlayerVolume=1"]; + [self.eventList addObject:@"videoPlayerVolume =1"]; + + } + + + } + + + else if([absoluteURLText containsString:@"type=volumeChange"] && [absoluteURLText containsString:@"videoPlayerVolume%5D=0"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDVolumeChange"]){ + [self.eventList addObject:@"type=volumeChange"]; + [self.eventList addObject:@"mediaPlayerVolume=1"]; + [self.eventList addObject:@"videoPlayerVolume =0"]; + + } + + } + + else if([absoluteURLText containsString:@"type=impression&data%5BimpressionType%5D=beginToRender&data%5BmediaType%5D=video&data%5BcreativeType%5D=video"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDBeginToRenderer"]){ + + [self.eventList addObject:@"type=impression"]; + [self.eventList addObject:@"impressionType=beginToRender"]; + [self.eventList addObject:@"creativeType=video"]; + [self.eventList addObject:@"mediaType=video"]; + } + } + + else if([absoluteURLText containsString:@"type=pause&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + + [self.eventList addObject:@"type=pause"]; + } + } + else if([absoluteURLText containsString:@"type=resume&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OMIDScreenEvent"]){ + [self.eventList addObject:@"type=resume"]; + } + } + else if([absoluteURLText containsString:@"percentageInView%5D=100"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"OmidPercentageInView"]){ + + [self.eventList addObject:@"percentageInView=100"]; + } + } + else if([absoluteURLText containsString:@"type=firstQuartile&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + [self.eventList addObject:@"type=firstQuartile"]; + } + } + + else if([absoluteURLText containsString:@"type=midpoint&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + [self.eventList addObject:@"type=midpoint"]; + } + } + else if([absoluteURLText containsString:@"type=thirdQuartile&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + + [self.eventList addObject:@"type=thirdQuartile"]; + } + } + else if([absoluteURLText containsString:@"type=complete&data=undefined"]){ + + if( [[NSProcessInfo processInfo].arguments containsObject:@"QuartileEvent"]){ + + [self.eventList addObject:@"type=complete"]; + } + + [self videoAdTestCompletionAction]; + + + } + else if([absoluteURLText containsString:@"type=sessionFinish&data=undefined"]){ + if( [[NSProcessInfo processInfo].arguments containsObject:@"SessionFinish"]){ + [self.eventList addObject:@"type=sessionFinish"]; + } + [self videoAdTestCompletionAction]; + + } + else if([absoluteURLText containsString:@"type=skipped"]){ + if([[NSProcessInfo processInfo].arguments containsObject:@"SKIP"]){ + [self.eventList addObject:@"type=skipped"]; + [self videoAdTestCompletionAction]; + } + } + }); +} + +// videoAdTestCompletionAction: Called when SDK capture the needed URL +- (void)videoAdTestCompletionAction{ + NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:self.eventList]; + self.eventList = [[orderedSet array] mutableCopy]; + [self.tableView reloadData]; + self.tableView.hidden = NO; + [self.videoAd pauseAd]; + [self.videoAd removeFromSuperview]; +} + + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return self.eventList.count; +} +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath] ; + NSString *value = [self.eventList objectAtIndex:indexPath.row]; + cell.textLabel.text = value; + return cell; +} + +@end diff --git a/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.storyboard b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.storyboard new file mode 100644 index 000000000..f0b08a261 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/ViewabilityTrackerUITests/ViewabilityVideoAd/VideoAdViewabilityTrackerTestVC.storyboard @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/TrackerUITest/TrackerApp/main.m b/tests/TrackerUITest/TrackerApp/main.m new file mode 100644 index 000000000..f4c5a5673 --- /dev/null +++ b/tests/TrackerUITest/TrackerApp/main.m @@ -0,0 +1,26 @@ +/* Copyright 2020 APPNEXUS INC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/tests/TrackerUITest/TrackerTests/BannerAdOnePXScrollViewController.m b/tests/TrackerUITest/TrackerTests/BannerAdOnePXScrollViewController.m new file mode 100644 index 000000000..2711b0aab --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/BannerAdOnePXScrollViewController.m @@ -0,0 +1,87 @@ +// +// BannerAdOnePXScrollViewController.m +// TrackerTests +// +// Created by abhisheksharma on 05/03/21. +// Copyright © 2021 Xandr. All rights reserved. +// + +#import +#import "Constant.h" + +@interface BannerAdOnePXScrollViewController : XCTestCase + +@end + +@implementation BannerAdOnePXScrollViewController + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + [[[XCUIApplication alloc] init] launch]; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + + +/* + testBannerImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Ad. + */ +- (void)testBannerImpressionTracker1PXTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerImpression1PxTrackerTest]; + [app launch]; + + XCUIElement *impressionTrackerNotFired = app.staticTexts[@"Not Fired"]; + [self waitForElementToAppear:impressionTrackerNotFired withTimeout:8];; + XCTAssertTrue(impressionTrackerNotFired.exists); + + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + + +} + +/* + testNativeImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Ad. + */ +- (void)testNativeImpressionTracker1PXTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeImpression1PxTrackerTest]; + [app launch]; + + XCUIElement *impressionTrackerNotFired = app.staticTexts[@"Not Fired"]; + [self waitForElementToAppear:impressionTrackerNotFired withTimeout:15];; + XCTAssertTrue(impressionTrackerNotFired.exists); + + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + + +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/BannerAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/BannerAdTrackerTestVC.m new file mode 100644 index 000000000..dc991b27a --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/BannerAdTrackerTestVC.m @@ -0,0 +1,80 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +/* + BannerAdTrackerTestVC: testcase are used to test impression and click tracker are getting fired for BannerAd. + */ + + +#import +#import "Constant.h" + +@interface BannerAdTrackerTestVC : XCTestCase + +@end + +@implementation BannerAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testBannerImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Ad. + */ +- (void)testBannerImpressionTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} +/* + testBannerClickTrackerTestAd: To test the click tracker is fired by the Banner Ad. + */ +- (void)testBannerClickTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerImpressionClickTrackerTest]; + [app launch]; + XCUIElement *bannerad = app.webViews.firstMatch; + [self waitForElementToAppear:bannerad withTimeout:ClickTrackerTimeout];; + [bannerad tap]; + sleep(10); + XCUIElement *okButton = app.toolbars[@"Toolbar"].buttons[@"OK"]; + [self waitForElementToAppear:okButton withTimeout:ClickTrackerTimeout]; + [okButton tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/BannerNativeAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/BannerNativeAdTrackerTestVC.m new file mode 100644 index 000000000..0fe3bcf23 --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/BannerNativeAdTrackerTestVC.m @@ -0,0 +1,81 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface BannerNativeAdTrackerTestVC : XCTestCase + +@end + +@implementation BannerNativeAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testBannerNativeImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Native Ad. + */ +- (void)testBannerNativeImpressionTrackerTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + +} + +/* + testInterstitialClickTrackerTestAd: To test the click tracker is fired by the Banner Native Ad. + */ +- (void)testBannerNativeClickTrackerTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeImpressionClickTrackerTest]; + [app launch]; + + XCUIElement *nativerenderercampaignClickButton = app.buttons[@"clickElements"] ; + [self waitForElementToAppear:nativerenderercampaignClickButton withTimeout:ClickTrackerTimeout];; + [nativerenderercampaignClickButton tap]; + + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); + + +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/BannerNativeRendererAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/BannerNativeRendererAdTrackerTestVC.m new file mode 100644 index 000000000..04d3276af --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/BannerNativeRendererAdTrackerTestVC.m @@ -0,0 +1,76 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface BannerNativeRendererAdTrackerTestVC : XCTestCase + +@end + +@implementation BannerNativeRendererAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testBannerNativeRendererImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Native Renderer Ad. + */ + +- (void)testBannerNativeRendererImpressionTrackerTestAd { + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} + +/* + testBannerNativeRendererClickTrackerTestAd: To test the click tracker is fired by the Banner Native Renderer Ad. + */ +- (void)testBannerNativeRendererClickTrackerTestAd { + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererImpressionClickTrackerTest]; + [app launch]; + + XCUIElement *nativeRendererCampaignStaticText = [[[app.webViews.links[@"Native Renderer Campaign Native Renderer Campaign"] childrenMatchingType:XCUIElementTypeLink] matchingIdentifier:@"Native Renderer Campaign"] elementBoundByIndex:0].staticTexts[@"Native Renderer Campaign"]; + [self waitForElementToAppear:nativeRendererCampaignStaticText withTimeout:ClickTrackerTimeout]; + [nativeRendererCampaignStaticText tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); +} + + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} +@end diff --git a/tests/TrackerUITest/TrackerTests/BannerVideoAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/BannerVideoAdTrackerTestVC.m new file mode 100644 index 000000000..7778c798b --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/BannerVideoAdTrackerTestVC.m @@ -0,0 +1,77 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface BannerVideoAdTrackerTestVC : XCTestCase + +@end + +@implementation BannerVideoAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + + +/* + testBannerVideoImpressionTrackerTestAd: To test the impression tracker is fired by the Banner Video Ad. + */ +- (void)testBannerVideoImpressionTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} + +/* + testBannerVideoClickTrackerTestAd: To test the click tracker is fired by the Banner Video Ad. + */ +- (void)testBannerVideoClickTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoImpressionClickTrackerTest]; + [app launch]; + XCUIElement *videoAd = app.webViews.buttons[@"Ad - Learn More"]; + [self waitForElementToAppear:videoAd withTimeout:ClickTrackerTimeout];; + [videoAd tap]; + [videoAd tap]; + XCUIElement *okButton = app.toolbars[@"Toolbar"].buttons[@"OK"]; + [self waitForElementToAppear:okButton withTimeout:ClickTrackerTimeout]; + [okButton tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); +} + + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/Info.plist b/tests/TrackerUITest/TrackerTests/Info.plist new file mode 100644 index 000000000..64d65ca49 --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/tests/TrackerUITest/TrackerTests/InterstitialAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/InterstitialAdTrackerTestVC.m new file mode 100644 index 000000000..39021667f --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/InterstitialAdTrackerTestVC.m @@ -0,0 +1,84 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface InterstitialAdTrackerTestVC : XCTestCase + +@end + +@implementation InterstitialAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testInterstitialImpressionTrackerTestAd: To test the impression tracker is fired by the Interstitial Ad. + */ +- (void)testInterstitialImpressionTrackerTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialImpressionClickTrackerTest]; + [app launch]; + + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} +/* + testInterstitialClickTrackerTestAd: To test the click tracker is fired by the Interstitial Ad. + */ +// Click Tracker Testcase is not working +- (void)testInterstitialClickTrackerTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialImpressionClickTrackerTest]; + [app launch]; + + /* + XCUIElement *interstitialAd = app.webViews.staticTexts[@"Open Measurement Test Creative"]; + [self waitForElementToAppear:interstitialAd withTimeout:8];; + [interstitialAd tap]; + XCUIElement *closeBox = app.buttons[@"interstitial flat closebox"]; + [self waitForElementToAppear:closeBox withTimeout:25]; + [closeBox tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:8];; + XCTAssertTrue(clickTracker.exists); + */ + +} + + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/MARBannerAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/MARBannerAdTrackerTestVC.m new file mode 100644 index 000000000..cb411611f --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/MARBannerAdTrackerTestVC.m @@ -0,0 +1,82 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface MARBannerAdTrackerTestVC : XCTestCase + +@end + +@implementation MARBannerAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testMARBannerImpressionTrackerTestAd: To test the impression tracker is fired by the MAR Banner Ad. + */ +- (void)testMARBannerImpressionTrackerTestAd { + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:MARBannerImpressionClickTrackerTest]; + [app launch]; + + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + +} +/* + testMARBannerClickTrackerTestAd: To test the click tracker is fired by the MAR Banner Ad. + */ +- (void)testMARBannerClickTrackerTestAd { + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:MARBannerImpressionClickTrackerTest]; + [app launch]; + + XCUIElement *bannerButton = app.webViews.firstMatch ; + [self waitForElementToAppear:bannerButton withTimeout:ClickTrackerTimeout];; + [bannerButton tap]; + [bannerButton tap]; + XCUIElement *okButton = app.toolbars[@"Toolbar"].buttons[@"OK"]; + [self waitForElementToAppear:okButton withTimeout:ClickTrackerTimeout]; + [okButton tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); + + + + +} +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/MARBannerNativeRendererAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/MARBannerNativeRendererAdTrackerTestVC.m new file mode 100644 index 000000000..be63764cc --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/MARBannerNativeRendererAdTrackerTestVC.m @@ -0,0 +1,78 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface MARBannerNativeRendererAdTrackerTestVC : XCTestCase + +@end + +@implementation MARBannerNativeRendererAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testMARBannerNativeImpressionTrackerTestAd: To test the impression tracker is fired by the MAR BannerNativeRenderer Ad. + */ +- (void)testMARBannerNativeImpressionTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:MARBannerNativeRendererImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} + +/* + testMARBannerNativeClickTrackerTestAd: To test the click tracker is fired by the MAR BannerNativeRenderer Ad. + */ +- (void)testMARBannerNativeRendererClickTrackerTestAd { +// +// XCUIApplication *app = [[XCUIApplication alloc] init]; +// app.launchArguments = [app.launchArguments arrayByAddingObject:MARBannerNativeRendererImpressionClickTrackerTest]; +// [app launch]; +// +// +// XCUIElement *bannerad = app.staticTexts[@"This is a test creative"]; +// [self waitForElementToAppear:bannerad withTimeout:8];; +// [bannerad tap]; +// +//// XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; +//// [self waitForElementToAppear:clickTracker withTimeout:8];; +// XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; +// [self waitForElementToAppear:impressionTracker withTimeout:8];; +// XCTAssertTrue(impressionTracker.exists); +//// XCTAssertTrue(clickTracker.exists); + +} +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/MARNativeAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/MARNativeAdTrackerTestVC.m new file mode 100644 index 000000000..a42c05b17 --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/MARNativeAdTrackerTestVC.m @@ -0,0 +1,80 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface MARNativeAdTrackerTestVC : XCTestCase + +@end + +@implementation MARNativeAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testMARBannerNativeImpressionTrackerTestAd: To test the impression tracker is fired by the MAR BannerNative Ad. + */ +- (void)testMARBannerNativeImpressionTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:MARNativeImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + +} + +/* + testMARBannerNativeClickTrackerTestAd: To test the click tracker is fired by the MAR BannerNative Ad. + */ +- (void)testMARBannerNativeClickTrackerTestAd { + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:MARNativeImpressionClickTrackerTest]; + [app launch]; +// XCUIElement *nativerenderercampaignClickButton = app.staticTexts[@"Click"] ; +// [self waitForElementToAppear:nativerenderercampaignClickButton withTimeout:8];; +// [nativerenderercampaignClickButton tap]; + + +// XCUIElement *clickActionOK = app/*@START_MENU_TOKEN@*/.toolbars[@"Toolbar"]/*[[".otherElements[@\"In App Browser\"].toolbars[@\"Toolbar\"]",".toolbars[@\"Toolbar\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.buttons[@"OK"] ; +// [self waitForElementToAppear:clickActionOK withTimeout:ClickTrackerTimeout]; +// [clickActionOK tap]; +// wait(6); +// XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; +// [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; +// XCTAssertTrue(clickTracker.exists); +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/NativeAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/NativeAdTrackerTestVC.m new file mode 100644 index 000000000..037a28e90 --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/NativeAdTrackerTestVC.m @@ -0,0 +1,79 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ +#import +#import "Constant.h" +@interface NativeAdTrackerTestVC : XCTestCase + +@end + +@implementation NativeAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testNativeImpressionTrackerTestAd: To test the impression tracker is fired by the Native Ad. + */ +- (void)testNativeImpressionTrackerTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); + + +} + +/* + testNativeClickTrackerTestAd: To test the click tracker is fired by the Native Ad. + */ +- (void)testNativeClickTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeImpressionClickTrackerTest]; + [app launch]; + XCUIElement *nativerenderercampaignClickButton = app.buttons[@"clickElements"] ; + [self waitForElementToAppear:nativerenderercampaignClickButton withTimeout:8];; + [nativerenderercampaignClickButton tap]; + XCUIElement *clickActionOK = app/*@START_MENU_TOKEN@*/.toolbars[@"Toolbar"]/*[[".otherElements[@\"In App Browser\"].toolbars[@\"Toolbar\"]",".toolbars[@\"Toolbar\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.buttons[@"OK"] ; + [self waitForElementToAppear:clickActionOK withTimeout:ClickTrackerTimeout]; + [clickActionOK tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); + + +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/TrackerTests/VideoAdTrackerTestVC.m b/tests/TrackerUITest/TrackerTests/VideoAdTrackerTestVC.m new file mode 100644 index 000000000..9da9b0a96 --- /dev/null +++ b/tests/TrackerUITest/TrackerTests/VideoAdTrackerTestVC.m @@ -0,0 +1,76 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface VideoAdTrackerTestVC : XCTestCase + +@end + +@implementation VideoAdTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testVideoImpressionTrackerTestAd: To test the impression tracker is fired by the Video Ad. + */ + +- (void)testVideoImpressionTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoImpressionClickTrackerTest]; + [app launch]; + XCUIElement *impressionTracker = app.staticTexts[@"ImpressionTracker"]; + [self waitForElementToAppear:impressionTracker withTimeout:ImpressionTrackerTimeout];; + XCTAssertTrue(impressionTracker.exists); +} + +/* + testVideoClickTrackerTestAd: To test the click tracker is fired by the Video Ad. + */ +- (void)testVideoClickTrackerTestAd { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoImpressionClickTrackerTest]; + [app launch]; + XCUIElement *videoAd = app.webViews.buttons[@"Learn More - Ad"]; + [self waitForElementToAppear:videoAd withTimeout:ClickTrackerTimeout];; + [videoAd tap]; + XCUIElement *okButton = app.toolbars[@"Toolbar"].buttons[@"OK"]; + [self waitForElementToAppear:okButton withTimeout:ClickTrackerTimeout]; + [okButton tap]; + XCUIElement *clickTracker = app.staticTexts[@"ClickTracker"]; + [self waitForElementToAppear:clickTracker withTimeout:ClickTrackerTimeout];; + XCTAssertTrue(clickTracker.exists); +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/BannerNativeViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/BannerNativeViewabilityTrackerTests.m new file mode 100644 index 000000000..d44137757 --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/BannerNativeViewabilityTrackerTests.m @@ -0,0 +1,292 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface BannerNativeViewabilityTrackerTests : XCTestCase + +@end + +@implementation BannerNativeViewabilityTrackerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testBannerNativeAdOMIDOmidSupportedIsYes: To test the OMID is supported tracker is fired by the Banner Native Ad. +*/ +- (void)testBannerNativeAdOMIDOmidSupportedIsYes { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidSupported"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"OmidSupported=true"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeAdOMIDOmidSessionStart: To test the OMID is Session Start & few related events are fired by the BannerNative Ad. + */ +- (void)testBannerNativeAdOMIDOmidSessionStart { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeAdOMIDOmidTypeLoaded: To test the OMID is loaded with different events like impressionType,mediaType & creativeType + */ +- (void)testBannerNativeAdOMIDOmidTypeLoaded { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"TypeLoaded"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=loaded"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeAdOMIDOmidPercentageInView0: To test the OMID is 0% Viewable + */ +- (void)testBannerNativeAdOMIDOmidPercentageInView0 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView0"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testBannerNativeAdOMIDOmidPercentageInView100: To test the OMID is 100% Viewable + */ +- (void)testBannerNativeAdOMIDOmidPercentageInView100 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView100"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=MoreThan0"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testBannerNativeAdOMIDOmidSessionFinish: To verify Session finish getting fired + */ +- (void)testBannerNativeAdOMIDOmidSessionFinish { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +/* + testBannerNativeRendererAdOMIDOmidSupportedIsYes: To test the OMID is supported tracker is fired by the Banner Native Renderer Ad. +*/ +- (void)testBannerNativeRendererAdOMIDOmidSupportedIsYes { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidSupported"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"OmidSupported=true"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeAdOMIDOmidSessionStart: To test the OMID is Session Start & few related events are fired by the Banner Native Renderer Ad. + */ +- (void)testBannerNativeRendererAdOMIDOmidSessionStart { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeRendererAdOMIDOmidTypeLoaded: To test the OMID is loaded with different events like impressionType,mediaType & creativeType + */ +- (void)testBannerNativeRendererAdOMIDOmidTypeLoaded { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"TypeLoaded"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=loaded"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testBannerNativeRendererAdOMIDOmidPercentageInView0: To test the OMID is 0% Viewable + */ +- (void)testBannerNativeRendererAdOMIDOmidPercentageInView0 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView0"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:30]; +} + + +/* + testBannerNativeRendererAdOMIDOmidPercentageInView100: To test the OMID is 100% Viewable + */ +- (void)testBannerNativeRendererAdOMIDOmidPercentageInView100 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView100"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=MoreThan0"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testBannerNativeRendererAdOMIDOmidSessionFinish: To verify Session finish getting fired + */ +- (void)testBannerNativeRendererAdOMIDOmidSessionFinish { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerNativeRendererViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:30]; +} + + +// +// +//- (void)testBannerNativeRendererAd { +// // Use recording to get started writing UI tests. +// // Use XCTAssert and related functions to verify your tests produce the correct results. +// XCUIApplication *app = [[XCUIApplication alloc] init]; +// [app launch]; +// +// XCUIElement *impressionTrackersButton = app.tables.staticTexts[@"ViewabilityTrackersTest"]; +// [self waitForElementToAppear:impressionTrackersButton withTimeout:8];; +// [impressionTrackersButton tap]; +// +// XCUIElement *bannerButton = app.tables.staticTexts[@"Banner Native Renderer"]; +// [self waitForElementToAppear:bannerButton withTimeout:8];; +// +// [bannerButton tap]; +// XCUIElement *viewabilityBanneradNavigationBar = app.navigationBars[@"ViewabilityBannerNativeRenderer"]; +// [self waitForElementToAppear:viewabilityBanneradNavigationBar withTimeout:8];; +// +// XCUIElement *hideShowAdButton = viewabilityBanneradNavigationBar.buttons[@"Hide/Show Ad"]; +// [self waitForElementToAppear:hideShowAdButton withTimeout:8];; +// +// [hideShowAdButton tap]; +// sleep(5); +// [hideShowAdButton tap]; +// sleep(5); +// [viewabilityBanneradNavigationBar.buttons[@"Delete"] tap]; +// +// XCUIElement * result = app.tables.staticTexts[@"OmidSupported=true"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"sessionStart"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"accessMode=limited"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"partnerName=Appnexus"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"mediaType=display"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"impressionType=viewable"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +//// result = app.tables.staticTexts[@"percentageInView=0"]; +//// [self waitForElementToAppear:result withTimeout:8]; +//// +// +// +// result = app.tables.staticTexts[@"type=sessionFinish"]; +// [self waitForElementToAppear:result withTimeout:8]; +//} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/BannerVideoViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/BannerVideoViewabilityTrackerTests.m new file mode 100644 index 000000000..2a51cee64 --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/BannerVideoViewabilityTrackerTests.m @@ -0,0 +1,296 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface BannerVideoViewabilityTrackerTests : XCTestCase + +@end + +@implementation BannerVideoViewabilityTrackerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testBannerVideoAdOMIDSessionFinish: Verify OMID Session Finish event. + */ +- (void)testBannerVideoAdOMIDSessionFinish { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + XCUIElement *result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:40]; +} +/* + testBannerVideoAdOMIDQuartileEvent: Verify OMID Quartile event. + */ +- (void)testBannerVideoAdOMIDQuartileEvent { + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"QuartileEvent"]; + [app launch]; + XCUIElement *result = app.tables.staticTexts[@"type=firstQuartile"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"type=midpoint"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"type=thirdQuartile"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"type=complete"]; + [self waitForElementToAppear:result withTimeout:8]; +} + +/* + testBannerVideoAdOMIDSessionStart: Verify OMID Session Finish. + */ +- (void)testBannerVideoAdOMIDSessionStart { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement *result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:38]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"omidImplementer=omsdk"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"partnerVersion"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"supports=[clid,vlid]"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"adSessionType=html"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"impressionType=definedByJavaScript"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"mediaType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"creativeType=definedByJavaScript"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"supportsLoadedEvent=true"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"verificationParameters=iabtechlab-appnexus"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"deviceInfo=iOS"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"environment=app"]; + [self waitForElementToAppear:result withTimeout:8]; + +} +/* + testBannerVideoAdOMIDVolumeChange: Verify OMID Volume Change. + */ +- (void)testBannerVideoAdOMIDVolumeChange { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OMIDVolumeChange"]; + [app launch]; + XCUIElementQuery *webViewsQuery = app.webViews; + XCUIElement *unmute = webViewsQuery.buttons[@" Unmute"]; + [self waitForElementToAppear:unmute withTimeout:10]; + [unmute tap]; + XCUIElement *mute = webViewsQuery.buttons[@" Mute"]; + [self waitForElementToAppear:mute withTimeout:10]; + [mute tap]; + sleep(5); + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationLandscapeLeft; + sleep(5); + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; + XCUIElement *result = app.tables.staticTexts[@"type=volumeChange"]; + [self waitForElementToAppear:result withTimeout:40]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=0"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume =0"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=volumeChange"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume =1"]; + [self waitForElementToAppear:result withTimeout:8]; +} + +/* + testBannerVideoAdOMIDScreenEvent: Verify OMID Screen Events like Full Screen & Non Full Screen. + */ +- (void)testBannerVideoAdOMIDScreenEvent { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + + + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OMIDScreenEvent"]; + [app launch]; + + XCUIElementQuery *webViewsQuery = app.webViews.webViews.webViews; + XCUIElement *fullscreen = webViewsQuery.buttons[@" Fullscreen"]; + [self waitForElementToAppear:fullscreen withTimeout:10];; + [fullscreen tap]; + XCUIElement *nonfullscreen = webViewsQuery.buttons[@" Non-Fullscreen"]; + [self waitForElementToAppear:nonfullscreen withTimeout:10];; + [nonfullscreen tap]; + sleep(5); + + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationLandscapeLeft; + sleep(5); + + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; + XCUIElement * result = app.tables.staticTexts[@"type=playerStateChange state=fullscreen"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"type=playerStateChange state=normal"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=pause"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=resume"]; +} + + +/* + testBannerVideoAdOMIDSupportedIsYes: Verify OMID is supported or not. + */ +- (void)testBannerVideoAdOMIDSupportedIsYes { + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SupportedIsYes"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"version=1.0.2-dev"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"supported=yes"]; + [self waitForElementToAppear:result withTimeout:8]; + +} +/* + testBannerVideoAdOMIDBeginToRenderer: Verify OMID BeginToRenderer, with new additional events . + */ +- (void)testBannerVideoAdOMIDBeginToRenderer { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OMIDBeginToRenderer"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"type=loaded"]; + [self waitForElementToAppear:result withTimeout:40]; + + + result = app.tables.staticTexts[@"skippable=false"]; + [self waitForElementToAppear:result withTimeout:40]; + + + result = app.tables.staticTexts[@"position=In-Banner"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"impressionType=beginToRender"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"creativeType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"autoPlay=true"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=start"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"impressionType=beginToRender"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"duration=32.23"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"deviceVolume"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"duration=32.23"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"deviceVolume"]; + [self waitForElementToAppear:result withTimeout:8]; +} +/* + testBannerVideoAdOMIDViewablity: Verify OMID visisble Percentage from zero to 100% . + */ +- (void)testBannerVideoAdOMIDViewablity { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerVideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:40]; + + result = app.tables.staticTexts[@"percentageInView=100"]; + [self waitForElementToAppear:result withTimeout:8]; + +} +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/BannerViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/BannerViewabilityTrackerTests.m new file mode 100644 index 000000000..ca64f0d54 --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/BannerViewabilityTrackerTests.m @@ -0,0 +1,200 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" + +@interface BannerAdViewabilityTrackerTestVC : XCTestCase + +@end + +@implementation BannerAdViewabilityTrackerTestVC + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* +testBannerOMIDEventSupportedIsYes: To test the OMID is supported tracker is fired by the Banner Ad. +*/ +-(void)testBannerOMIDEventSupportedIsYes{ + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SupportedIsYes"]; + + + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"supported=yes"]; + [self waitForElementToAppear:result withTimeout:60]; +} + +/* + testBannerOMIDEventSessionStart: To test the OMID is Session Start & few related events are fired by the Banner Ad. + */ +-(void)testBannerOMIDEventSessionStart{ + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"environment=app"]; + [self waitForElementToAppear:result withTimeout:60]; + result = app.tables.staticTexts[@"adSessionType=html"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"supports=[clid,vlid]"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"deviceInfo=iOS"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=htmlDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"omidJsInfo=serviceVersion,omidImplementer:omsdk"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"app={appId,libraryVersion}"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"verificationParameters=undefined"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:30]; + +} + +/* + testBannerOMIDEventViewable100Percentage: To test the OMID is 100% Viewable + */ +- (void)testBannerOMIDEventViewable100Percentage { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"Viewable100Percentage"]; + + + + + [app launch]; + + XCUIElement *result = app.tables.staticTexts[@"percentageInView=100"]; + [self waitForElementToAppear:result withTimeout:60]; + result = app.tables.staticTexts[@"type=geometryChange"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testBannerOMIDVersionEvent: To verify the OMID version + */ +- (void)testBannerOMIDVersionEvent { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"VersionEvent"]; + + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"version=1.0.2-dev"]; + [self waitForElementToAppear:result withTimeout:60]; + +} + + +/* + testBannerOMIDEventViewable0Percentage: To test the OMID is 0% Viewable + */ +- (void)testBannerOMIDEventViewable0Percentage { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"Viewable0Percentage"]; + [app launch]; + + XCUIElement *result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:60]; + result = app.tables.staticTexts[@"type=geometryChange"]; + [self waitForElementToAppear:result withTimeout:30]; + +} + + + +/* + testBannerOMIDTypeImpression: To test the OMID Media Type and impressionType + */ +- (void)testBannerOMIDTypeImpression { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"TypeImpression"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=impression"]; + [self waitForElementToAppear:result withTimeout:60]; + + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=htmlDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} + + +/* + testBannerOMIDSessionFinish: To verify Session finish getting fired + */ +- (void)testBannerOMIDSessionFinish { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:BannerViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:60]; +} + + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/Info.plist b/tests/TrackerUITest/ViewabilityTests/Info.plist new file mode 100644 index 000000000..64d65ca49 --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/tests/TrackerUITest/ViewabilityTests/InterstitialViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/InterstitialViewabilityTrackerTests.m new file mode 100644 index 000000000..615ea573f --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/InterstitialViewabilityTrackerTests.m @@ -0,0 +1,179 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface InterstitialViewabilityTrackerTests : XCTestCase + +@end + +@implementation InterstitialViewabilityTrackerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} +/* + testInterstitialOMIDEventSupportedIsYes: To test the OMID is supported tracker is fired by the Interstitial Ad. + */ +-(void)testInterstitialOMIDEventSupportedIsYes{ + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SupportedIsYes"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"supported=yes"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testInterstitialOMIDEventSessionStart: To test the OMID is Session Start & few related events are fired by the Interstitial Ad. + */ +-(void)testInterstitialOMIDEventSessionStart{ + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"environment=app"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"adSessionType=html"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"supports=[clid,vlid]"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"deviceInfo=iOS"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=htmlDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"omidJsInfo=serviceVersion,omidImplementer:omsdk"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"app={appId,libraryVersion}"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"verificationParameters=undefined"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:30]; + +} + +/* + testInterstitialOMIDEventViewable100Percentage: To test the OMID is 100% Viewable + */ +- (void)testInterstitialOMIDEventViewable100Percentage { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"Viewable100Percentage"]; + [app launch]; + + XCUIElement *result = app.tables.staticTexts[@"percentageInView=100"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"type=geometryChange"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testInterstitialOMIDVersionEvent: To verify the OMID version + */ +- (void)testInterstitialOMIDVersionEvent { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"VersionEvent"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"version=1.0.2-dev"]; + [self waitForElementToAppear:result withTimeout:30]; + +} + +/* + testInterstitialOMIDEventViewable0Percentage: To test the OMID is 0% Viewable + */ +- (void)testInterstitialOMIDEventViewable0Percentage { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"Viewable0Percentage"]; + [app launch]; + XCUIElement *result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"type=geometryChange"]; + [self waitForElementToAppear:result withTimeout:30]; + +} +/* + testInterstitialOMIDTypeImpression: To test the OMID Media Type and impressionType + */ +- (void)testInterstitialOMIDTypeImpression { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"TypeImpression"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"type=impression"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=htmlDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testInterstitialOMIDSessionFinish: To verify Session finish getting fired + */ +- (void)testInterstitialOMIDSessionFinish { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:InterstitialViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/NativeViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/NativeViewabilityTrackerTests.m new file mode 100644 index 000000000..4fc06ea5f --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/NativeViewabilityTrackerTests.m @@ -0,0 +1,142 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface NativeViewabilityTrackerTests : XCTestCase + +@end + +@implementation NativeViewabilityTrackerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +/* + testNativeAdOMIDOmidSupportedIsYes: To test the OMID is supported tracker is fired by the Native Ad. +*/ +- (void)testNativeAdOMIDOmidSupportedIsYes { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidSupported"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"OmidSupported=true"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testNativeAdOMIDOmidSessionStart: To test the OMID is Session Start & few related events are fired by the Native Ad. + */ +- (void)testNativeAdOMIDOmidSessionStart { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testNativeAdOMIDOmidTypeLoaded: To test the OMID is loaded with different events like impressionType,mediaType & creativeType + */ +- (void)testNativeAdOMIDOmidTypeLoaded { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"TypeLoaded"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=loaded"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"impressionType=viewable"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"mediaType=display"]; + [self waitForElementToAppear:result withTimeout:30]; + result = app.tables.staticTexts[@"creativeType=nativeDisplay"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testNativeAdOMIDOmidPercentageInView0: To test the OMID is 0% Viewable + */ +- (void)testNativeAdOMIDOmidPercentageInView0 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView0"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/* + testNativeAdOMIDOmidPercentageInView100: To test the OMID is 100% Viewable + */ +- (void)testNativeAdOMIDOmidPercentageInView100 { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView100"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=MoreThan0"]; + [self waitForElementToAppear:result withTimeout:30]; +} +/* + testNativeAdOMIDOmidSessionFinish: To verify Session finish getting fired + */ +- (void)testNativeAdOMIDOmidSessionFinish { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:NativeViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + + XCUIElement * result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:30]; +} + +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/ViewabilityTests/VideoViewabilityTrackerTests.m b/tests/TrackerUITest/ViewabilityTests/VideoViewabilityTrackerTests.m new file mode 100644 index 000000000..4978765c9 --- /dev/null +++ b/tests/TrackerUITest/ViewabilityTests/VideoViewabilityTrackerTests.m @@ -0,0 +1,409 @@ +/* Copyright 2020 APPNEXUS INC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import +#import "Constant.h" +@interface VideoViewabilityTrackerTests : XCTestCase + +@end + +@implementation VideoViewabilityTrackerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +// +//- (void)testVideoAd { +// // Use recording to get started writing UI tests. +// // Use XCTAssert and related functions to verify your tests produce the correct results. +// XCUIApplication *app = [[XCUIApplication alloc] init]; +// [app launch]; +// +// XCUIElement *impressionTrackersButton = app.tables.staticTexts[@"ViewabilityTrackersTest"]; +// [self waitForElementToAppear:impressionTrackersButton withTimeout:8];; +// [impressionTrackersButton tap]; +// +// XCUIElement *bannerButton = app.tables.staticTexts[@"Video"]; +// [self waitForElementToAppear:bannerButton withTimeout:8];; +// +// [bannerButton tap]; +// +// +// XCUIElementQuery *webViewsQuery = app.webViews.webViews.webViews; +// +// +// XCUIElement *mute = webViewsQuery.buttons[@" Mute"]; +// [self waitForElementToAppear:mute withTimeout:10]; +// [mute tap]; +// +// XCUIElement *unmute = webViewsQuery.buttons[@" Unmute"]; +// [self waitForElementToAppear:unmute withTimeout:10]; +// [unmute tap]; +// +// +//// +//// XCUIElement *fullscreen = webViewsQuery.buttons[@" Fullscreen"]; +//// [self waitForElementToAppear:fullscreen withTimeout:10];; +//// [fullscreen tap]; +//// +//// XCUIElement *nonfullscreen = webViewsQuery.buttons[@" Non-Fullscreen"]; +//// [self waitForElementToAppear:nonfullscreen withTimeout:10];; +//// [nonfullscreen tap]; +// +// sleep(5); +// +// [XCUIDevice sharedDevice].orientation = UIDeviceOrientationLandscapeLeft; +// sleep(5); +// +// [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; +// +// +// XCUIElement *learnMore = webViewsQuery.buttons[@"Learn More - Ad"]; +// [self waitForElementToAppear:learnMore withTimeout:10];; +// [learnMore tap]; +// +// XCUIElement *okButton = app.toolbars[@"Toolbar"].buttons[@"OK"]; +// [self waitForElementToAppear:okButton withTimeout:25]; +// [okButton tap]; +// +// +// XCUIElement * result = app.tables.staticTexts[@"version=1.0.2-dev"]; +// [self waitForElementToAppear:result withTimeout:35]; +// +// XCUIElement *viewabilityBanneradNavigationBar = app.navigationBars[@"Viewability VideoAd"]; +// [self waitForElementToAppear:viewabilityBanneradNavigationBar withTimeout:8];; +// [viewabilityBanneradNavigationBar.buttons[@"Delete"] tap]; +// +// result = app.tables.staticTexts[@"supported=yes"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"sessionStart"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +//// result = app.tables.staticTexts[@"percentageInView=0"]; +//// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=loaded skippable=false position=In-Video"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=start"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=volumeChange mediaPlayerVolume=1 videoPlayerVolume =1"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=volumeChange mediaPlayerVolume=1 videoPlayerVolume =0"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=impression impressionType=beginToRender"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=pause"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=resume"]; +// [self waitForElementToAppear:result withTimeout:8]; +// result = app.tables.staticTexts[@"type=firstQuartile"]; +// [self waitForElementToAppear:result withTimeout:8]; +//// result = app.tables.staticTexts[@"type=playerStateChange state=normal"]; +//// [self waitForElementToAppear:result withTimeout:8]; +// result = app.tables.staticTexts[@"type=midpoint"]; +// [self waitForElementToAppear:result withTimeout:8]; +// result = app.tables.staticTexts[@"type=thirdQuartile"]; +// [self waitForElementToAppear:result withTimeout:8]; +// result = app.tables.staticTexts[@"type=complete"]; +// [self waitForElementToAppear:result withTimeout:8]; +// result = app.tables.staticTexts[@"type=resume"]; +// [self waitForElementToAppear:result withTimeout:8]; +// +// result = app.tables.staticTexts[@"type=sessionFinish"]; +// [self waitForElementToAppear:result withTimeout:8]; +//} +// +// +// + +/* + testVideoSkipTestAd: Verify OMID SKIP event. + */ +- (void)testVideoSkipTestAd { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SKIP"]; + + [app launch]; + + + XCUIElementQuery *webViewsQuery = app.webViews.webViews.webViews; + XCUIElement *skipAction = webViewsQuery.buttons[@"SKIP"]; + [self waitForElementToAppear:skipAction withTimeout:40];; + [skipAction tap]; + XCUIElement *result = app.tables.staticTexts[@"type=skipped"]; + [self waitForElementToAppear:result withTimeout:20]; +} + + +/* + testVideoAdOMIDSessionFinish: Verify OMID Session Finish event. + */ +- (void)testVideoAdOMIDSessionFinish { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionFinish"]; + [app launch]; + XCUIElement *result = app.tables.staticTexts[@"type=sessionFinish"]; + [self waitForElementToAppear:result withTimeout:40]; +} +/* + testVideoAdOMIDQuartileEvent: Verify OMID Quartile event. + */ +- (void)testVideoAdOMIDQuartileEvent { + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"QuartileEvent"]; + [app launch]; + XCUIElement *result = app.tables.staticTexts[@"type=firstQuartile"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"type=midpoint"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"type=thirdQuartile"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"type=complete"]; + [self waitForElementToAppear:result withTimeout:8]; +} + +/* + testVideoAdOMIDSessionStart: Verify OMID Session Finish. + */ +- (void)testVideoAdOMIDSessionStart { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SessionStart"]; + [app launch]; + + XCUIElement *result = app.tables.staticTexts[@"sessionStart"]; + [self waitForElementToAppear:result withTimeout:38]; + result = app.tables.staticTexts[@"partnerName=Appnexus"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"omidImplementer=omsdk"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"accessMode=limited"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"partnerVersion"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"supports=[clid,vlid]"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"adSessionType=html"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"impressionType=definedByJavaScript"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"mediaType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"creativeType=definedByJavaScript"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"supportsLoadedEvent=true"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"verificationParameters=iabtechlab-appnexus"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"deviceInfo=iOS"]; + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"environment=app"]; + [self waitForElementToAppear:result withTimeout:8]; + +} +/* + testVideoAdOMIDVolumeChange: Verify OMID Volume Change. + */ +- (void)testVideoAdOMIDVolumeChange { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OMIDVolumeChange"]; + [app launch]; + XCUIElementQuery *webViewsQuery = app.webViews; + XCUIElement *mute = webViewsQuery.buttons[@" Mute"]; + [self waitForElementToAppear:mute withTimeout:10]; + [mute tap]; + + XCUIElement *unmute = webViewsQuery.buttons[@" Unmute"]; + [self waitForElementToAppear:unmute withTimeout:10]; + [unmute tap]; + + sleep(5); + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationLandscapeLeft; + sleep(5); + [XCUIDevice sharedDevice].orientation = UIDeviceOrientationPortrait; + XCUIElement *result = app.tables.staticTexts[@"type=volumeChange"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume =1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=volumeChange"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume =0"]; + [self waitForElementToAppear:result withTimeout:8]; + + +} + +/* + testVideoAdOMIDSupportedIsYes: Verify OMID is supported or not. + */ +- (void)testVideoAdOMIDSupportedIsYes { + + + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"SupportedIsYes"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"version=1.0.2-dev"]; + [self waitForElementToAppear:result withTimeout:40]; + result = app.tables.staticTexts[@"supported=yes"]; + [self waitForElementToAppear:result withTimeout:8]; + +} + +/* + testVideoAdOMIDBeginToRenderer: Verify OMID BeginToRenderer, with new additional events . + */ +- (void)testVideoAdOMIDBeginToRenderer { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OMIDBeginToRenderer"]; + [app launch]; + XCUIElement * result = app.tables.staticTexts[@"type=loaded"]; + [self waitForElementToAppear:result withTimeout:40]; + + + result = app.tables.staticTexts[@"skippable=true"]; + [self waitForElementToAppear:result withTimeout:40]; + + + result = app.tables.staticTexts[@"position=In-Video"]; + [self waitForElementToAppear:result withTimeout:40]; + + + result = app.tables.staticTexts[@"impressionType=beginToRender"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"creativeType=video"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"autoPlay=true"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=start"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"impressionType=beginToRender"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"type=impression"]; + + [self waitForElementToAppear:result withTimeout:8]; + result = app.tables.staticTexts[@"duration=32.23"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"deviceVolume"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"videoPlayerVolume"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"duration=32.23"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"mediaPlayerVolume=1"]; + [self waitForElementToAppear:result withTimeout:8]; + + result = app.tables.staticTexts[@"deviceVolume"]; + [self waitForElementToAppear:result withTimeout:8]; +} + +/* + testVideoAdOMIDViewablity: Verify OMID visisble Percentage from zero to 100% . + */ +- (void)testVideoAdOMIDViewablity { + XCUIApplication *app = [[XCUIApplication alloc] init]; + app.launchArguments = [app.launchArguments arrayByAddingObject:VideoViewabilityTrackerTest]; + app.launchArguments = [app.launchArguments arrayByAddingObject:@"OmidPercentageInView"]; + [app launch]; + + + + XCUIElement * result = app.tables.staticTexts[@"percentageInView=0"]; + [self waitForElementToAppear:result withTimeout:40]; + + result = app.tables.staticTexts[@"percentageInView=100"]; + [self waitForElementToAppear:result withTimeout:8]; + +} + +- (void)wait:(NSUInteger)interval { + + XCTestExpectation *expectation = [self expectationWithDescription:@"wait"]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(interval * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [expectation fulfill]; + }); + [self waitForExpectationsWithTimeout:interval handler:nil]; +} +/** + Wait n amount of time for XCUIElement to appear on the screen + @param element : XCUIElement that's required to appear. + @param timeout : time for that UIElement wait for to appear. + */ +- (void)waitForElementToAppear:(XCUIElement *)element withTimeout:(NSTimeInterval)timeout +{ + + NSPredicate *exists = [NSPredicate predicateWithFormat:@"exists == 1"]; + + [self expectationForPredicate:exists evaluatedWithObject:element handler:nil]; + [self waitForExpectationsWithTimeout:timeout handler:nil]; +} + +@end diff --git a/tests/TrackerUITest/runbrowserStackTest.sh b/tests/TrackerUITest/runbrowserStackTest.sh new file mode 100644 index 000000000..4a5e7697c --- /dev/null +++ b/tests/TrackerUITest/runbrowserStackTest.sh @@ -0,0 +1,143 @@ +#echo "" | sudo -S chown -R `whoami` ~/.npm +#echo "" | sudo chown -R `whoami` /usr/local/lib/node_modules + +#export PATH=/usr/local/bin:$PATH + +#git -C "$(brew --repo homebrew/core)" fetch --unshallow + +#brew update +# Update homebrew recipes + +#brew install jq + +#curl -s http://api.open-notify.org/iss-now.json | jq .timestamp + + +pwd + +#cd tests/TrackerUITest +## Build the project +xcodebuild -project TrackerApp.xcodeproj -scheme TrackerApp -archivePath ./automationbuild/output/TrackerApp.xcarchive archive +## +### Build the IPA +xcodebuild -exportArchive -archivePath ./automationbuild/output/TrackerApp.xcarchive -exportPath ./automationbuild/output/ipa -exportOptionsPlist TrackerApp/Info.plist + +# Get current working Directory +presentWorkingDirectory=$(pwd) +echo "presentWorkingDirectory==> $presentWorkingDirectory" + +# Set Browser Stack userName & accessKey +userName="mobilesdkteam1" +accessKey="eAqGKNyysiKQmX1wDUQ4" + +# Add devices list +#devices="\"iPhone 11 Pro-13\",\"iPhone XS-14\",\"iPhone 12-14\",\"iPhone 11-14\",\"iPhone XS-13\"" +devices="\"iPhone 12-14\"" +#[\"iPhone 11 Pro-13\",\"iPhone XS-14\",\"iPhone 12-14\",\"iPhone 11-14\",\"iPhone XS-13\"] +##devices=["iPhone 11 Pro-13","iPhone XS-14","iPhone 12-14","iPhone 11-14","iPhone XS-13"] +echo " devcies==>$devices" + +# Upload IPA for browser Stack and get appurl +appurl=$(curl -u "$userName:$accessKey" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@$presentWorkingDirectory/automationbuild/output/ipa/TrackerApp.ipa" | jq .app_url) +echo "appurl==> $appurl" + +# Build test target +xcodebuild -scheme TrackerApp build-for-testing -derivedDataPath ./automationbuild/ + +# find build of test target +cd automationbuild/Build/Products/Debug-iphoneos +# Zip build ViewabilityTests +zip --symlinks -r ViewabilityTests-Runner.zip ViewabilityTests-Runner.app +# Zip build TrackerTests +zip --symlinks -r TrackerTests-Runner.zip TrackerTests-Runner.app + +# Move back to parent directory +cd .. +cd .. +cd .. +cd .. + +# Upload ViewabilityTests build to browser Stack and get viewability_test_url +viewability_test_url=$(curl -u "$userName:$accessKey" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suite" -F "file=@$presentWorkingDirectory/automationbuild/Build/Products/Debug-iphoneos/ViewabilityTests-Runner.zip" | jq .test_url) + +# Print viewability_test_url +echo "viewability_test_url==> $viewability_test_url" + +echo "<==Running ViewabilityTests==>" + +# Run ViewabilityTests build +#curl -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d "{\"networkLogs\" : \"true\",\"devices\": [$devices], \"app\": \"$appurl\", \"deviceLogs\" : \"true\", \"testSuite\": \"$viewability_test_url\"}" -H "Content-Type: application/json" -u "$userName:$accessKey" + +buildIdViewabilityTests=$(curl -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d "{\"networkLogs\" : \"true\",\"devices\": [$devices], \"app\": $appurl, \"deviceLogs\" : \"true\", \"testSuite\": $viewability_test_url}" -H "Content-Type: application/json" -u "$userName:$accessKey"| jq .build_id | tr -d \") +echo "buildIdViewabilityTests==> $buildIdViewabilityTests" + +# Upload TrackerTests build to browser Stack and get viewability_test_url +tracker_test_url=$(curl -u "$userName:$accessKey" -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/test-suite" -F "file=@$presentWorkingDirectory/automationbuild/Build/Products/Debug-iphoneos/TrackerTests-Runner.zip" | jq .test_url) +# Print tracker_test_url +echo "tracker_test_url==> $tracker_test_url" + + +echo "<==Running TrackerTest==>" +buildIdTrackerTest=$(curl -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d "{\"networkLogs\" : \"true\" +,\"devices\": [$devices], \"app\": $appurl, \"deviceLogs\" : \"true\", \"testSuite\": $tracker_test_url}" -H "Content-Type: application/json" -u "$userName:$accessKey"| jq .build_id | tr -d \") +echo "buildIdTrackerTest==> $buildIdTrackerTest" + +# Run TrackerTests build +#curl -X POST "https://api-cloud.browserstack.com/app-automate/xcuitest/build" -d "{\"networkLogs\" : \"true\" +#,\"devices\": [$devices], \"app\": \"$appurl\", \"deviceLogs\" : \"true\", \"testSuite\": \"$tracker_test_url\"}" -H "Content-Type: application/json" -u "$userName:$accessKey" + + + +# Print buildIdViewabilityTests & buildIdTrackerTest +#echo "ViewabilityTests buildId ==> $buildIdViewabilityTests" +#echo "TrackerTest buildId ==> $buildIdTrackerTest" + + + +# remove automationbuild Directory +#rm -rf automationbuild + + + + +echo "buildIdTrackerTest ab ==> $buildIdTrackerTest" + +# Wait for testcase result Viewability Tests +testTrackerTestResult="running" +if [ $testTrackerTestResult == "running" ] ; then result=true; else result=false; fi +while $result; do sleep 1; testTrackerTestResult=$(curl -u "mobilesdkteam1:eAqGKNyysiKQmX1wDUQ4" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/builds/$buildIdTrackerTest" | jq '.status' | tr -d \"); + +if [ $testTrackerTestResult == "running" ] ; then result=true; else result=false; fi +echo "Please wait.......\n"; +sleep 60 +done +#testTrackerTestResult=$(curl -u "mobilesdkteam1:eAqGKNyysiKQmX1wDUQ4" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/builds/$buildIdTrackerTest" | json status +echo "Test Result Impression & Click Tracker.......$testTrackerTestResult\n"; + +# Wait for testcase result Viewability Tests +testViewabilityTestsResult="running" +if [ $testViewabilityTestsResult == "running" ] ; then result=true; else result=false; fi + + + +echo "buildIdViewabilityTests ab ==> $buildIdViewabilityTests" + +while $result; do sleep 1; testViewabilityTestsResult=$(curl -u "mobilesdkteam1:eAqGKNyysiKQmX1wDUQ4" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/builds/$buildIdViewabilityTests" | jq '.status' | tr -d \"); + +if [ $testViewabilityTestsResult == "running" ] ; then result=true; else result=false; fi +echo "Please wait.......\n"; +sleep 60 +done +#testViewabilityTestsResult=$(curl -u "mobilesdkteam1:eAqGKNyysiKQmX1wDUQ4" -X GET "https://api-cloud.browserstack.com/app-automate/xcuitest/v2/builds/$buildIdTrackerTest" | json status +echo "Test Result OMID Tracker.......$testViewabilityTestsResult\n"; + + +if [ $testViewabilityTestsResult != "passed" ] ; then + exit 1 +fi + + +if [ $testTrackerTestResult != "passed" ] ; then + exit 1 +fi + diff --git a/tests/UITestApp/UITestAppTests/PlacementTests/BannerVideoAdTests/ANBannerVideoAdViewTests.swift b/tests/UITestApp/UITestAppTests/PlacementTests/BannerVideoAdTests/ANBannerVideoAdViewTests.swift index 2572fa72b..cd9a3cc4c 100644 --- a/tests/UITestApp/UITestAppTests/PlacementTests/BannerVideoAdTests/ANBannerVideoAdViewTests.swift +++ b/tests/UITestApp/UITestAppTests/PlacementTests/BannerVideoAdTests/ANBannerVideoAdViewTests.swift @@ -71,7 +71,7 @@ class ANBannerVideoAdViewTests: XCTestCase, ANBannerAdViewDelegate { - let unmuteStaticText = webViewsQuery/*@START_MENU_TOKEN@*/.staticTexts["unmute"]/*[[".otherElements[\"ebBannerIFrame_23227072_3747381026391887\"].staticTexts[\"unmute\"]",".staticTexts[\"unmute\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ + let unmuteStaticText = webViewsQuery.staticTexts["unmute"] XCTAssertEqual(unmuteStaticText.exists, true) unmuteStaticText.tap() diff --git a/tests/UnitTestApp/FunctionalTests/ANBannerAdViewHTMLImpressionTestCase.m b/tests/UnitTestApp/FunctionalTests/ANBannerAdViewHTMLImpressionTestCase.m index ad37d28b8..5d8c24ba4 100644 --- a/tests/UnitTestApp/FunctionalTests/ANBannerAdViewHTMLImpressionTestCase.m +++ b/tests/UnitTestApp/FunctionalTests/ANBannerAdViewHTMLImpressionTestCase.m @@ -49,6 +49,7 @@ - (void)setUp { self.bannerAdView = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"16392991" adSize:CGSizeMake(300, 250)]; + self.bannerAdView.delegate = self; } @@ -88,6 +89,21 @@ - (void)testImpressionRecorded { XCTAssertTrue(self.impressionurlWasFired); } +- (void)test1PxImpressionRecorded { + ANSDKSettings.sharedInstance.countImpressionOn1PxRendering = YES; + //[self.bannerAdView setCountImpressionOnAdReceived:YES]; + [[ANGlobal getKeyWindow].rootViewController.view addSubview:self.bannerAdView]; + [self.bannerAdView loadAd]; + self.loadAdSuccesfulException = [self expectationWithDescription:@"Waiting for adDidReceiveAd to be received"]; + [self waitForExpectationsWithTimeout:60 + handler:^(NSError *error) { + + }]; + XCTAssertEqual(self.bannerAdView.adResponseInfo.adType, ANAdTypeBanner); + [XCTestCase delayForTimeInterval:3.0]; + XCTAssertTrue(self.impressionurlWasFired); +} + /* * As per the implementation, impression tracker will always be fired either Ad is `loaded` when countImpressionOnAdReceived API is set YES * or Ad is `displayed` when countImpressionOnAdReceived API at its default value NO. diff --git a/tests/UnitTestApp/FunctionalTests/ANRealTimerTestCase.m b/tests/UnitTestApp/FunctionalTests/ANRealTimerTestCase.m new file mode 100644 index 000000000..7878528b1 --- /dev/null +++ b/tests/UnitTestApp/FunctionalTests/ANRealTimerTestCase.m @@ -0,0 +1,52 @@ +// +// ANRealTimerTestCase.m +// FunctionalTests +// +// Created by Punnaghai Puviarasu on 3/1/21. +// Copyright © 2021 AppNexus. All rights reserved. +// + +#import +#import "ANRealTimer.h" +#import "ANSDKSettings.h" +#import "XCTestCase+ANCategory.h" + +@interface ANRealTimerTestCase : XCTestCase +@property (nonatomic, strong) XCTestExpectation *loadAdSuccesfulException; +@property (nonatomic, readwrite, assign) BOOL oneSecTimerNotification; +@end + +@implementation ANRealTimerTestCase + +- (void)setUp { + self.loadAdSuccesfulException = nil; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(handle1SecTimerSentNotification) + name:@"kTimerNotification" + object:nil]; + self.oneSecTimerNotification = NO; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testSetTimerFor1Sec{ + ANSDKSettings.sharedInstance.countImpressionOn1PxRendering = YES; + [ANRealTimer addDelegate:self]; + + self.loadAdSuccesfulException = [self expectationWithDescription:@"Timer Exception"]; + + [self waitForExpectationsWithTimeout:1 handler:nil]; + XCTAssertTrue(self.oneSecTimerNotification); + +} + +- (void)handle1SecTimerSentNotification { + self.oneSecTimerNotification = YES; + [ANRealTimer removeDelegate:self]; + [self.loadAdSuccesfulException fulfill]; +} + +@end diff --git a/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m b/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m index c6f5be0f8..51e1278b8 100644 --- a/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m +++ b/tests/UnitTestApp/FunctionalTests/ANUniversalTagRequestBuilderFunctionalTests.m @@ -1025,6 +1025,78 @@ - (void)testUTRequestExternalUserIds } +- (void)testUTRequestDoNotTrackYES +{ + + ANSDKSettings.sharedInstance.doNotTrack = YES; // This value should be seen as true in UT Request body + TestANUniversalFetcher *adFetcher = [[TestANUniversalFetcher alloc] initWithPlacementId:placementID]; + + + NSURLRequest *request = [ANUniversalTagRequestBuilder buildRequestWithAdFetcherDelegate:adFetcher.delegate]; + XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; + + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), + ^{ + NSError *error; + + id jsonObject = [NSJSONSerialization JSONObjectWithData:request.HTTPBody + options:kNilOptions + error:&error]; + TESTTRACEM(@"jsonObject=%@", jsonObject); + XCTAssertNil(error); + XCTAssertNotNil(jsonObject); + XCTAssertTrue([jsonObject isKindOfClass:[NSDictionary class]]); + NSDictionary *jsonDict = (NSDictionary *)jsonObject; + NSDictionary *userDict = jsonDict[@"user"]; + XCTAssertNotNil(userDict); + + BOOL dntValue = userDict[@"dnt"]; + XCTAssertTrue(dntValue); + + [expectation fulfill]; + }); + + [self waitForExpectationsWithTimeout:UTMODULETESTS_TIMEOUT handler:nil]; + +} + +- (void)testUTRequestDoNotTrackNO +{ + + ANSDKSettings.sharedInstance.doNotTrack = NO; // When set to NO, dnt param should not be sent in ad request + TestANUniversalFetcher *adFetcher = [[TestANUniversalFetcher alloc] initWithPlacementId:placementID]; + + + NSURLRequest *request = [ANUniversalTagRequestBuilder buildRequestWithAdFetcherDelegate:adFetcher.delegate]; + XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]]; + + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), + ^{ + NSError *error; + + id jsonObject = [NSJSONSerialization JSONObjectWithData:request.HTTPBody + options:kNilOptions + error:&error]; + TESTTRACEM(@"jsonObject=%@", jsonObject); + XCTAssertNil(error); + XCTAssertNotNil(jsonObject); + XCTAssertTrue([jsonObject isKindOfClass:[NSDictionary class]]); + NSDictionary *jsonDict = (NSDictionary *)jsonObject; + NSDictionary *userDict = jsonDict[@"user"]; + XCTAssertNotNil(userDict); + + XCTAssertFalse([userDict objectForKey:@"dnt"]); + + + [expectation fulfill]; + }); + + [self waitForExpectationsWithTimeout:UTMODULETESTS_TIMEOUT handler:nil]; + +} + @end diff --git a/tests/UnitTestApp/FunctionalTests/Info.plist b/tests/UnitTestApp/FunctionalTests/Info.plist index 43acce3c7..c295d086f 100644 --- a/tests/UnitTestApp/FunctionalTests/Info.plist +++ b/tests/UnitTestApp/FunctionalTests/Info.plist @@ -18,7 +18,11 @@ 1.0 CFBundleVersion 1 - GADIsAdManagerApp - + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + GADIsAdManagerApp + + GADIsAdManagerApp - 2 + diff --git a/tests/UnitTestApp/ReleaseTestAppTests/Info.plist b/tests/UnitTestApp/ReleaseTestAppTests/Info.plist index 64d65ca49..b5c14fe98 100644 --- a/tests/UnitTestApp/ReleaseTestAppTests/Info.plist +++ b/tests/UnitTestApp/ReleaseTestAppTests/Info.plist @@ -18,5 +18,9 @@ 1.0 CFBundleVersion 1 + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + GADIsAdManagerApp + diff --git a/tests/UnitTestApp/UnitTestApp.xcodeproj/project.pbxproj b/tests/UnitTestApp/UnitTestApp.xcodeproj/project.pbxproj index bf7bd8a5c..4cfaf15e6 100644 --- a/tests/UnitTestApp/UnitTestApp.xcodeproj/project.pbxproj +++ b/tests/UnitTestApp/UnitTestApp.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -424,6 +424,7 @@ 4FE5D818248A223400B86BDA /* testMARCombinationAllRTB.json in Resources */ = {isa = PBXBuildFile; fileRef = 0E3D3F2523C4D2CD00BCBE14 /* testMARCombinationAllRTB.json */; }; 4FF9B85E23AC0C3E00A9EB56 /* TestGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF9B85C23AC0C3E00A9EB56 /* TestGlobal.m */; }; 4FF9B85F23AC0CE000A9EB56 /* TestGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF9B85C23AC0C3E00A9EB56 /* TestGlobal.m */; }; + 600A4D3125ED574A0085F722 /* ANRealTimerTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 600A4D3025ED574A0085F722 /* ANRealTimerTestCase.m */; }; 607BB64523F32852002A0F57 /* appnexus_standard_response.json in Resources */ = {isa = PBXBuildFile; fileRef = 0E3F32DD23CE68E300CA830D /* appnexus_standard_response.json */; }; 607BB64723F32860002A0F57 /* testMARCombinationTwoRTBNative.json in Resources */ = {isa = PBXBuildFile; fileRef = 0E2B4BAC23C4AD6E002AFBD8 /* testMARCombinationTwoRTBNative.json */; }; 607BB64823F32936002A0F57 /* ANNativeAdRequest+ANTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EEFE19922008124002B5F5F /* ANNativeAdRequest+ANTest.m */; }; @@ -485,7 +486,6 @@ FC4C72D224FEFC1C00379108 /* ANAdResponseRTB_NativeFail.json in Resources */ = {isa = PBXBuildFile; fileRef = FC4C72D124FEFC1C00379108 /* ANAdResponseRTB_NativeFail.json */; }; FC4C72D424FEFCAE00379108 /* ANAdResponseRTB_BannerFail.json in Resources */ = {isa = PBXBuildFile; fileRef = FC4C72D324FEFCAE00379108 /* ANAdResponseRTB_BannerFail.json */; }; FC4C72D624FEFD8500379108 /* ANAdResponseCSM_BannerFail.json in Resources */ = {isa = PBXBuildFile; fileRef = FC4C72D524FEFD8500379108 /* ANAdResponseCSM_BannerFail.json */; }; - FC4C72E324FF02B800379108 /* GoogleMobileAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4C72E224FF02B800379108 /* GoogleMobileAds.framework */; }; FC4E6F2924E9779E003F2381 /* ReleaseTestAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FC4E6F2824E9779E003F2381 /* ReleaseTestAppTests.m */; }; FC4E6F3124E977AE003F2381 /* AdPerformanceStatsBannerAdTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E6636022458A9EC008FB3FB /* AdPerformanceStatsBannerAdTestCase.m */; }; FC4E6F3224E977BA003F2381 /* AdPerformanceStatsBannerNativeRendererAdTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E6636162458D04C008FB3FB /* AdPerformanceStatsBannerNativeRendererAdTestCase.m */; }; @@ -546,6 +546,12 @@ FC871DA325BB038F003144BC /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC871DA125BB038F003144BC /* FBAudienceNetwork.framework */; }; FC871DA425BB038F003144BC /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC871DA125BB038F003144BC /* FBAudienceNetwork.framework */; }; FCBF0CD624D1E3CC00EA4474 /* ANGlobal+ANTest.m in Sources */ = {isa = PBXBuildFile; fileRef = FCBF0CD524D1E3CC00EA4474 /* ANGlobal+ANTest.m */; }; + FCC235D525F12709004A5467 /* GoogleMobileAds.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC235C225F125DF004A5467 /* GoogleMobileAds.xcframework */; }; + FCC2362625F12A17004A5467 /* nanopb.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC2361C25F12A17004A5467 /* nanopb.xcframework */; }; + FCC2362925F12A17004A5467 /* UserMessagingPlatform.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC2361D25F12A17004A5467 /* UserMessagingPlatform.xcframework */; }; + FCC2362C25F12A17004A5467 /* PromisesObjC.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC2361E25F12A17004A5467 /* PromisesObjC.xcframework */; }; + FCC2362F25F12A17004A5467 /* GoogleAppMeasurement.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC2361F25F12A17004A5467 /* GoogleAppMeasurement.xcframework */; }; + FCC2363225F12A17004A5467 /* GoogleUtilities.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCC2362025F12A17004A5467 /* GoogleUtilities.xcframework */; }; FCE9649224EA5FBC002FA163 /* HTTPCookieTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EA5DE4B24BF1AE100614011 /* HTTPCookieTestCase.m */; }; FCF5362024EEB3EA0058A3A2 /* ANPublicAPITrafficSourceCodeAndExtInvCode.m in Sources */ = {isa = PBXBuildFile; fileRef = FCF5361E24EEB3EA0058A3A2 /* ANPublicAPITrafficSourceCodeAndExtInvCode.m */; }; /* End PBXBuildFile section */ @@ -1072,6 +1078,7 @@ 4FE4DB08237B42F2005B5BCF /* MARHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MARHelper.h; sourceTree = ""; }; 4FF9B85A23AC0C3D00A9EB56 /* TestGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestGlobal.h; sourceTree = ""; }; 4FF9B85C23AC0C3E00A9EB56 /* TestGlobal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestGlobal.m; sourceTree = ""; }; + 600A4D3025ED574A0085F722 /* ANRealTimerTestCase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANRealTimerTestCase.m; sourceTree = ""; }; 60D39E44226F69A80029F741 /* ANVideoPlayerSettingsTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANVideoPlayerSettingsTestCase.m; sourceTree = ""; }; 60F8A7FC23280A630030D53D /* ANJAMTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANJAMTestCase.m; sourceTree = ""; }; 60F8A80523280EC10030D53D /* ANJAMDispatchAppEventResponse.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ANJAMDispatchAppEventResponse.json; sourceTree = ""; }; @@ -1108,12 +1115,17 @@ FC4C72D124FEFC1C00379108 /* ANAdResponseRTB_NativeFail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ANAdResponseRTB_NativeFail.json; sourceTree = ""; }; FC4C72D324FEFCAE00379108 /* ANAdResponseRTB_BannerFail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ANAdResponseRTB_BannerFail.json; sourceTree = ""; }; FC4C72D524FEFD8500379108 /* ANAdResponseCSM_BannerFail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ANAdResponseCSM_BannerFail.json; sourceTree = ""; }; - FC4C72E224FF02B800379108 /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMobileAds.framework; sourceTree = ""; }; FC4E6F2624E9779E003F2381 /* AppReleaseTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppReleaseTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; FC4E6F2824E9779E003F2381 /* ReleaseTestAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReleaseTestAppTests.m; sourceTree = ""; }; FC4E6F2A24E9779E003F2381 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; FC871DA125BB038F003144BC /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBAudienceNetwork.framework; path = mediationsdk/FacebookSDK/FBAudienceNetwork.framework; sourceTree = SOURCE_ROOT; }; FCBF0CD524D1E3CC00EA4474 /* ANGlobal+ANTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ANGlobal+ANTest.m"; sourceTree = ""; }; + FCC235C225F125DF004A5467 /* GoogleMobileAds.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = GoogleMobileAds.xcframework; sourceTree = ""; }; + FCC2361C25F12A17004A5467 /* nanopb.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = nanopb.xcframework; sourceTree = ""; }; + FCC2361D25F12A17004A5467 /* UserMessagingPlatform.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = UserMessagingPlatform.xcframework; sourceTree = ""; }; + FCC2361E25F12A17004A5467 /* PromisesObjC.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PromisesObjC.xcframework; sourceTree = ""; }; + FCC2361F25F12A17004A5467 /* GoogleAppMeasurement.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = GoogleAppMeasurement.xcframework; sourceTree = ""; }; + FCC2362025F12A17004A5467 /* GoogleUtilities.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = GoogleUtilities.xcframework; sourceTree = ""; }; FCF5361E24EEB3EA0058A3A2 /* ANPublicAPITrafficSourceCodeAndExtInvCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANPublicAPITrafficSourceCodeAndExtInvCode.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -1139,8 +1151,11 @@ files = ( 0E8C981A21FF36F6005D1F0E /* Accounts.framework in Frameworks */, 0E56C6F121F8AEF800ADE6E1 /* AdSupport.framework in Frameworks */, + FCC2362625F12A17004A5467 /* nanopb.xcframework in Frameworks */, 0E6B7E4822D8DE49005D069E /* AppNexusSDK.framework in Frameworks */, 0ED159DF2236B53000D56022 /* AssetsLibrary.framework in Frameworks */, + FCC2363225F12A17004A5467 /* GoogleUtilities.xcframework in Frameworks */, + FCC2362C25F12A17004A5467 /* PromisesObjC.xcframework in Frameworks */, 0E56C6F321F8AF0300ADE6E1 /* AudioToolbox.framework in Frameworks */, 0E56C6F521F8AF0A00ADE6E1 /* AVFoundation.framework in Frameworks */, 0E56C6F721F8AF0D00ADE6E1 /* AVKit.framework in Frameworks */, @@ -1158,17 +1173,19 @@ 0E56C6FF21F8AF2200ADE6E1 /* Foundation.framework in Frameworks */, 0E56C70321F8AF2D00ADE6E1 /* GameKit.framework in Frameworks */, 0ED159F92236B82900D56022 /* GLKit.framework in Frameworks */, - FC4C72E324FF02B800379108 /* GoogleMobileAds.framework in Frameworks */, + FCC2362925F12A17004A5467 /* UserMessagingPlatform.xcframework in Frameworks */, 0ED159E52236B54900D56022 /* JavaScriptCore.framework in Frameworks */, 00B5CB6E25DCC4FD003D1EFD /* FBAudienceNetwork.framework in Frameworks */, 0ED159E72236B55400D56022 /* libc++.tbd in Frameworks */, 0ED159E92236B55B00D56022 /* libsqlite3.tbd in Frameworks */, 0ED159EB2236B56100D56022 /* libxml2.tbd in Frameworks */, 0ED159ED2236B56700D56022 /* libz.tbd in Frameworks */, + FCC2362F25F12A17004A5467 /* GoogleAppMeasurement.xcframework in Frameworks */, 0E56C70121F8AF2700ADE6E1 /* MediaPlayer.framework in Frameworks */, 0E56C70521F8AF3200ADE6E1 /* MessageUI.framework in Frameworks */, 0E56C70721F8AF3700ADE6E1 /* MobileCoreServices.framework in Frameworks */, 0E56C70921F8AF3B00ADE6E1 /* PassKit.framework in Frameworks */, + FCC235D525F12709004A5467 /* GoogleMobileAds.xcframework in Frameworks */, 0E56C70B21F8AF3E00ADE6E1 /* QuartzCore.framework in Frameworks */, 0ED159EF2236B56B00D56022 /* SafariServices.framework in Frameworks */, 0E56C70D21F8AF4200ADE6E1 /* Security.framework in Frameworks */, @@ -1308,7 +1325,12 @@ 0E54378722DCB92B00301AEF /* GoogleAdMobSDK */ = { isa = PBXGroup; children = ( - FC4C72E224FF02B800379108 /* GoogleMobileAds.framework */, + FCC2361F25F12A17004A5467 /* GoogleAppMeasurement.xcframework */, + FCC2362025F12A17004A5467 /* GoogleUtilities.xcframework */, + FCC2361C25F12A17004A5467 /* nanopb.xcframework */, + FCC2361E25F12A17004A5467 /* PromisesObjC.xcframework */, + FCC2361D25F12A17004A5467 /* UserMessagingPlatform.xcframework */, + FCC235C225F125DF004A5467 /* GoogleMobileAds.xcframework */, ); path = GoogleAdMobSDK; sourceTree = ""; @@ -1798,6 +1820,7 @@ 0EEFE1AE220089FB002B5F5F /* MediationCallbacksTests.m */, 0E336C2C2461FB000033C76F /* NoNetworkAdFailTestCase.m */, 0EEFE190220080DE002B5F5F /* OutstreamVideoAdClassObjectFromUTResponseTests.m */, + 600A4D3025ED574A0085F722 /* ANRealTimerTestCase.m */, ); path = FunctionalTests; sourceTree = ""; @@ -2801,6 +2824,7 @@ 0E81279C23C88D810045D788 /* ANSSMMediationAdViewController+ANTest.m in Sources */, 0E8C97D021FF32EC005D1F0E /* ANTestGlobal.m in Sources */, 0E3FE351245999220096A978 /* ANTimeTracker.m in Sources */, + 600A4D3125ED574A0085F722 /* ANRealTimerTestCase.m in Sources */, 0E8C97A621FF32EC005D1F0E /* ANTrackerManager+ANTest.m in Sources */, 0EEFE1602200715C002B5F5F /* ANTrackerManagerTestCase.m in Sources */, 0EEFE1DD22008E6D002B5F5F /* ANUniversalAdFetcher+ANTest.m in Sources */, @@ -3043,7 +3067,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; - EXCLUDED_ARCHS = arm64; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\""; HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3076,7 +3100,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; - EXCLUDED_ARCHS = arm64; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\""; HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3237,10 +3261,10 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "$(PROJECT_DIR)/mediationsdk/FacebookSDK", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3277,6 +3301,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "$(PROJECT_DIR)/mediationsdk/FacebookSDK", @@ -3315,11 +3340,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../../../examples/AppNexusSDKApp/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "$(PROJECT_DIR)/mediationsdk/FacebookSDK", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3350,11 +3375,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../../../examples/AppNexusSDKApp/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "$(PROJECT_DIR)/mediationsdk/FacebookSDK", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3385,12 +3410,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../../../examples/AppNexusSDKApp/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "\"$(SRCROOT)/mediationsdk/FacebookSDK\"", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", - "$(PROJECT_DIR)/mediationsdk/FacebookSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3418,12 +3442,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/../../../examples/AppNexusSDKApp/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", "\"$(SRCROOT)/mediationsdk/FacebookSDK\"", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", - "$(PROJECT_DIR)/mediationsdk/FacebookSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3450,10 +3473,10 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3483,10 +3506,10 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HR94J6TSB3; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = ( "$(PROJECT_DIR)/mediatedsdk/GoogleAdMobSDK", "\"$(SRCROOT)/../../sdk/sourcefiles/Viewability\"", - "$(PROJECT_DIR)/mediationsdk/GoogleAdMobSDK", ); HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3516,6 +3539,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../../sdk\"/**"; HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -3544,6 +3568,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; + EXCLUDED_ARCHS = ""; FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../../sdk\"/**"; HEADER_SEARCH_PATHS = ( "$(inherited)", diff --git a/tests/UnitTestApp/UnitTestApp/Info.plist b/tests/UnitTestApp/UnitTestApp/Info.plist index 17682c03a..baa1a7662 100644 --- a/tests/UnitTestApp/UnitTestApp/Info.plist +++ b/tests/UnitTestApp/UnitTestApp/Info.plist @@ -18,8 +18,12 @@ 1.0 CFBundleVersion 1 + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 GADIsAdManagerApp + GADIsAdManagerApp - 2 + LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/tests/UnitTestApp/UnitTestApp/NativeAd/ANGADUnifiedNativeAdView.h b/tests/UnitTestApp/UnitTestApp/NativeAd/ANGADUnifiedNativeAdView.h index 059ef3959..23c790caf 100644 --- a/tests/UnitTestApp/UnitTestApp/NativeAd/ANGADUnifiedNativeAdView.h +++ b/tests/UnitTestApp/UnitTestApp/NativeAd/ANGADUnifiedNativeAdView.h @@ -13,8 +13,7 @@ limitations under the License. */ -#import - -@interface ANGADUnifiedNativeAdView : GADUnifiedNativeAdView +@import GoogleMobileAds; +@interface ANGADUnifiedNativeAdView : GADNativeAdView @end diff --git a/tests/UnitTestApp/UnitTests/Info.plist b/tests/UnitTestApp/UnitTests/Info.plist index 43acce3c7..f6b5297d9 100644 --- a/tests/UnitTestApp/UnitTests/Info.plist +++ b/tests/UnitTestApp/UnitTests/Info.plist @@ -18,7 +18,9 @@ 1.0 CFBundleVersion 1 - GADIsAdManagerApp - + GADApplicationIdentifier + ca-app-pub-3940256099942544~1458002511 + GADIsAdManagerApp + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/Info.plist new file mode 100644 index 000000000..e5eba6f76 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/Info.plist @@ -0,0 +1,42 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + GoogleAppMeasurement.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + GoogleAppMeasurement.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement new file mode 100644 index 000000000..76c4f25d6 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Info.plist new file mode 100644 index 000000000..1aaf686d9 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleAppMeasurement + CFBundleIdentifier + com.firebase.Firebase-GoogleAppMeasurement + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleAppMeasurement + CFBundlePackageType + FMWK + CFBundleVersion + 7.5.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Modules/module.modulemap new file mode 100644 index 000000000..d3499f09c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/Modules/module.modulemap @@ -0,0 +1,10 @@ +framework module GoogleAppMeasurement { +umbrella header "GoogleAppMeasurement-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "c++" + link "sqlite3" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/GoogleAppMeasurement b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/GoogleAppMeasurement new file mode 100644 index 000000000..1c2b221da Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/GoogleAppMeasurement differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Info.plist new file mode 100644 index 000000000..1aaf686d9 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleAppMeasurement + CFBundleIdentifier + com.firebase.Firebase-GoogleAppMeasurement + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleAppMeasurement + CFBundlePackageType + FMWK + CFBundleVersion + 7.5.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Modules/module.modulemap new file mode 100644 index 000000000..d3499f09c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleAppMeasurement.xcframework/ios-arm64_i386_x86_64-simulator/GoogleAppMeasurement.framework/Modules/module.modulemap @@ -0,0 +1,10 @@ +framework module GoogleAppMeasurement { +umbrella header "GoogleAppMeasurement-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "c++" + link "sqlite3" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h deleted file mode 100644 index ff97dadd7..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// DFPBannerViewOptions.h -// Google Mobile Ads SDK -// -// Copyright 2016 Google LLC. All rights reserved. -// - -#import -#import -#import -#import - -/// Ad loader options for banner ads. -@interface DFPBannerViewOptions : GADAdLoaderOptions - -/// Optional delegate that is notified if the loaded banner sends app events. -@property(nonatomic, weak, nullable) id appEventDelegate; - -/// Optional delegate that is notified if the loaded banner changes size. -@property(nonatomic, weak, nullable) id adSizeDelegate; - -/// Whether the publisher will record impressions manually when the ad becomes visible to the user. -@property(nonatomic, assign) BOOL enableManualImpressions; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPInterstitial.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPInterstitial.h deleted file mode 100644 index cd5d6b7b3..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPInterstitial.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// DFPInterstitial.h -// Google Mobile Ads SDK -// -// Copyright 2012 Google LLC. All rights reserved. -// - -#import -#import - -/// Google Ad Manager interstitial ad, a full-screen advertisement shown at natural -/// transition points in your application such as between game levels or news stories. -@interface DFPInterstitial : GADInterstitial - -/// Optional delegate that is notified when creatives send app events. -@property(nonatomic, weak, nullable) id appEventDelegate; - -/// Initializes an interstitial with an ad unit created on the Ad Manager website. Create a new ad -/// unit for every unique placement of an ad in your application. Set this to the ID assigned for -/// this placement. Ad units are important for targeting and statistics. -/// -/// Example Ad Manager ad unit ID: @"/6499/example/interstitial" -- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID NS_DESIGNATED_INITIALIZER; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdMetadata.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdMetadata.h deleted file mode 100644 index bee4edb85..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdMetadata.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// GADAdMetadata.h -// Google Mobile Ads SDK -// -// Copyright 2017 Google LLC. All rights reserved. -// - -#import - -/// Ad metadata key type. -typedef NSString *GADAdMetadataKey NS_STRING_ENUM; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchase.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchase.h deleted file mode 100644 index e5c522165..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchase.h +++ /dev/null @@ -1,84 +0,0 @@ -// -// GADInAppPurchase.h -// Google Mobile Ads SDK -// -// Copyright 2013 Google LLC. All rights reserved. -// - -#import -#import -#import - -@protocol GADDefaultInAppPurchaseDelegate; - -#pragma mark - Default Purchase Flow - -/// The consumable in-app purchase item that has been purchased by the user. The purchase flow is -/// handled by the Google Mobile Ads SDK. -/// Instances of this class are created and passed to your in-app purchase delegate after the user -/// has successfully paid for a product. Your code must correctly deliver the product to the user -/// and then call the didCompletePurchase method to finish the transaction. -GAD_DEPRECATED_ATTRIBUTE -@interface GADDefaultInAppPurchase : NSObject - -/// Enables the default consumable product in-app purchase flow handled by the Google Mobile Ads -/// SDK. The GADDefaultInAppPurchaseDelegate object is retained while the default purchase flow is -/// enabled. This method adds a SKPaymentTransactionObserver to the default SKPaymentQueue. -/// -/// Call this method early in your application to handle unfinished transactions from previous -/// application sessions. For example, call this method in your application delegate's -/// application:didFinishLaunchingWithOptions: method. -+ (void)enableDefaultPurchaseFlowWithDelegate:(nonnull id)delegate; - -/// Disables the default in-app purchase flow handled by the Google Mobile Ads SDK and releases the -/// associated GADDefaultInAppPurchaseDelegate object. -+ (void)disableDefaultPurchaseFlow; - -/// The in-app purchase product ID. -@property(nonatomic, readonly, copy, nonnull) NSString *productID; - -/// The product quantity. -@property(nonatomic, readonly, assign) NSInteger quantity; - -/// The purchased item's completed payment transaction. Your application can use this property's -/// data to save a permanent record of the completed payment. The default purchase flow will finish -/// the transaction on your behalf. Do not finish the transaction yourself. -@property(nonatomic, readonly, strong, nonnull) SKPaymentTransaction *paymentTransaction; - -/// The in-app purchase delegate object must first deliver the user's item and then call this -/// method. Failure to call this method will result in duplicate purchase notifications. -- (void)finishTransaction; - -@end - -#pragma mark - Custom Purchase Flow - -/// Enum of the different statuses resulting from processing a purchase. -GAD_DEPRECATED_ATTRIBUTE -typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { - kGADInAppPurchaseStatusError = 0, ///< Error occurred while processing the purchase. - kGADInAppPurchaseStatusSuccessful = 1, ///< Purchase was completed successfully. - kGADInAppPurchaseStatusCancel = 2, ///< Purchase was cancelled by the user. - kGADInAppPurchaseStatusInvalidProduct = 3 ///< Error occurred while looking up the product. -}; - -/// The in-app purchase item to be purchased with the purchase flow handled by you, the -/// application developer. -/// Instances of this class are created and passed to your GADInAppPurchaseDelegate object when -/// users click a buy button. It is important to report the result of the purchase back to the SDK -/// in order to track metrics about the transaction. -GAD_DEPRECATED_ATTRIBUTE -@interface GADInAppPurchase : NSObject - -/// The in-app purchase product ID. -@property(nonatomic, readonly, copy, nonnull) NSString *productID; - -/// The product quantity. -@property(nonatomic, readonly, assign) NSInteger quantity; - -/// The GADInAppPurchaseDelegate object must call this method after handling the in-app purchase -/// for both successful and unsuccessful purchase attempts. This method reports ad conversion and -/// purchase status information to Google. -- (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h deleted file mode 100644 index 28a48ac3c..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GADInAppPurchaseDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2013 Google LLC. All rights reserved. -// - -#import -#import - -@class GADDefaultInAppPurchase; -@class GADInAppPurchase; - -#pragma mark - Default Purchase Flow - -/// In-app purchase delegate protocol for default purchase handling. The delegate must deliver -/// the purchased item then call the GADDefaultInAppPurchase object's finishTransaction method. -GAD_DEPRECATED_ATTRIBUTE -@protocol GADDefaultInAppPurchaseDelegate - -/// Called when the user successfully paid for a purchase. You must first deliver the purchased -/// item to the user, then call defaultInAppPurchase's finishTransaction method. -- (void)userDidPayForPurchase:(nonnull GADDefaultInAppPurchase *)defaultInAppPurchase; - -@optional - -/// Called when the user clicks on the buy button of an in-app purchase ad. Return YES if the -/// default purchase flow should be started to purchase the item, otherwise return NO. If not -/// implemented, defaults to YES. -- (BOOL)shouldStartPurchaseForProductID:(nonnull NSString *)productID quantity:(NSInteger)quantity; - -@end - -#pragma mark - Custom Purchase Flow - -/// In-app purchase delegate protocol for custom purchase handling. The delegate must handle the -/// product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method. -GAD_DEPRECATED_ATTRIBUTE -@protocol GADInAppPurchaseDelegate - -/// Called when the user clicks on the buy button of an in-app purchase ad. After the receiver -/// handles the purchase, it must call the GADInAppPurchase object's reportPurchaseStatus: method. -- (void)didReceiveInAppPurchase:(nonnull GADInAppPurchase *)purchase; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAd.h deleted file mode 100644 index 25bb754aa..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAd.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// GADInstreamAd.h -// Google Mobile Ads SDK -// -// Copyright 2019 Google LLC. All rights reserved. -// - -#import -#import -#import -#import -#import -#import -#import - -@class GADInstreamAd; - -/// Instream ad load completion handler. On load success, |instreamAd| is the non-nil instream ad -/// and |error| is nil. On load failure, |instreamAd| is nil and |error| provides failure -/// information. -typedef void (^GADInstreamAdLoadCompletionHandler)(GADInstreamAd *_Nullable instreamAd, - NSError *_Nullable error); - -/// An instream ad. -GAD_DEPRECATED_ATTRIBUTE -@interface GADInstreamAd : NSObject - -/// Loads an instream ad with the provided ad unit ID. Instream ads only support -/// GADMediaAspectRatioLandscape and GADMediaAspectRatioPortrait media aspect ratios, defaulting to -/// GADMediaAspectRatioLandscape. Calls the provided completion handler when the ad load completes. -+ (void)loadAdWithAdUnitID:(nonnull NSString *)adUnitID - request:(nullable GADRequest *)request - mediaAspectRatio:(GADMediaAspectRatio)mediaAspectRatio - completionHandler:(nonnull GADInstreamAdLoadCompletionHandler)completionHandler; - -/// Loads an instream ad with the provided ad tag. Calls the provided completion handler when the -/// ad load completes. -+ (void)loadAdWithAdTag:(nonnull NSString *)adTag - completionHandler:(nonnull GADInstreamAdLoadCompletionHandler)completionHandler; - -/// Media content metadata and controls. -@property(nonatomic, readonly, nonnull) GADMediaContent *mediaContent; - -/// Information about the ad response that returned the ad. -@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; - -/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. -@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAdView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAdView.h deleted file mode 100644 index 209bb1fb9..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInstreamAdView.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// GADInstreamAdView.h -// Google Mobile Ads SDK -// -// Copyright 2019 Google LLC. All rights reserved. -// - -#import - -/// A view that displays instream video ads. -GAD_DEPRECATED_ATTRIBUTE -@interface GADInstreamAdView : UIView - -/// The instream ad. The ad will begin playing when the GADInstreamAdView is visible. -@property(nonatomic, nullable) GADInstreamAd *ad; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitial.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitial.h deleted file mode 100644 index b773f8b00..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitial.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// GADInterstitial.h -// Google Mobile Ads SDK -// -// Copyright 2011 Google LLC. All rights reserved. -// - -#import -#import -#import -#import -#import -#import -#import - -/// An interstitial ad. This is a full-screen advertisement shown at natural transition points in -/// your application such as between game levels or news stories. See -/// https://developers.google.com/admob/ios/interstitial to get started. -@interface GADInterstitial : NSObject - -/// Initializes an interstitial with an ad unit created on the AdMob website. Create a new ad unit -/// for every unique placement of an ad in your application. Set this to the ID assigned for this -/// placement. Ad units are important for targeting and statistics. -/// -/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" -- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID NS_DESIGNATED_INITIALIZER; - -#pragma mark Pre-Request - -/// The interstitial's ad unit ID. -@property(nonatomic, readonly, nullable) NSString *adUnitID; - -/// Optional delegate object that receives state change notifications from this GADInterstitalAd. -@property(nonatomic, weak, nullable) id delegate; - -#pragma mark Making an Ad Request - -/// Makes an interstitial ad request. Additional targeting options can be supplied with a request -/// object. Only one interstitial request is allowed at a time. -/// -/// This is best to do several seconds before the interstitial is needed to preload its content. -/// Then when transitioning between view controllers show the interstital with -/// presentFromViewController. -- (void)loadRequest:(nullable GADRequest *)request; - -#pragma mark Post-Request - -/// Returns YES if the interstitial is ready to be displayed. The delegate's -/// interstitialAdDidReceiveAd: will be called after this property switches from NO to YES. -@property(nonatomic, readonly) BOOL isReady; - -/// Returns YES if this object has already been presented. Interstitial objects can only be used -/// once even with different requests. -@property(nonatomic, readonly) BOOL hasBeenUsed; - -/// Information about the ad response that returned the current ad or an error. Nil until the first -/// ad request succeeds or fails. -@property(nonatomic, readonly, nullable) GADResponseInfo *responseInfo; - -/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. -@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; - -/// Presents the interstitial ad which takes over the entire screen until the user dismisses it. -/// This has no effect unless isReady returns YES and/or the delegate's interstitialDidReceiveAd: -/// has been received. -/// -/// Set rootViewController to the current view controller at the time this method is called. If your -/// application does not use view controllers pass in nil and your views will be removed from the -/// window to show the interstitial and restored when done. After the interstitial has been removed, -/// the delegate's interstitialDidDismissScreen: will be called. -- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController; - -/// Returns whether the interstitial can be presented from the provided root view controller. Sets -/// the error out parameter if the interstitial can't be presented. Must be called on the main -/// thread. -- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController - error:(NSError *_Nullable __autoreleasing *_Nullable)error; - -#pragma mark Deprecated - -/// Deprecated delegate. GADInAppPurchase is deprecated. -@property(nonatomic, weak, nullable) id inAppPurchaseDelegate - GAD_DEPRECATED_ATTRIBUTE; - -/// Deprecated intializer. Use initWithAdUnitID: instead. -- (nonnull instancetype)init GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID:."); - -/// Deprecated setter, use initWithAdUnitID: instead. -- (void)setAdUnitID:(nullable NSString *)adUnitID - GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID: instead of setting the ad unit ID."); - -/// Deprecated. Use responseInfo.adNetworkClassName instead. -@property(nonatomic, readonly, nullable) NSString *adNetworkClassName GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use responseInfo.adNetworkClassName."); - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h deleted file mode 100644 index 5768a581c..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// GADInterstitialDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2011 Google LLC. All rights reserved. -// - -#import -#import - -@class GADInterstitial; - -/// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad -/// requests succeeding/failing. -@protocol GADInterstitialDelegate - -@optional - -#pragma mark Ad Request Lifecycle Notifications - -/// Called when an interstitial ad request succeeded. Show it at the next transition point in your -/// application such as when transitioning between view controllers. -- (void)interstitialDidReceiveAd:(nonnull GADInterstitial *)ad; - -/// Called when an interstitial ad request completed without an interstitial to -/// show. This is common since interstitials are shown sparingly to users. -- (void)interstitial:(nonnull GADInterstitial *)ad - didFailToReceiveAdWithError:(nonnull GADRequestError *)error; - -#pragma mark Display-Time Lifecycle Notifications - -/// Called just before presenting an interstitial. After this method finishes the interstitial will -/// animate onto the screen. Use this opportunity to stop animations and save the state of your -/// application in case the user leaves while the interstitial is on screen (e.g. to visit the App -/// Store from a link on the interstitial). -- (void)interstitialWillPresentScreen:(nonnull GADInterstitial *)ad; - -/// Called when |ad| fails to present. -- (void)interstitialDidFailToPresentScreen:(nonnull GADInterstitial *)ad; - -/// Called before the interstitial is to be animated off the screen. -- (void)interstitialWillDismissScreen:(nonnull GADInterstitial *)ad; - -/// Called just after dismissing an interstitial and it has animated off the screen. -- (void)interstitialDidDismissScreen:(nonnull GADInterstitial *)ad; - -/// Called just before the application will background or terminate because the user clicked on an -/// ad that will launch another application (such as the App Store). The normal -/// UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately -/// before this. -- (void)interstitialWillLeaveApplication:(nonnull GADInterstitial *)ad; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAd.h deleted file mode 100644 index 7c8a3c78d..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAd.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// GADNativeAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import -#import - -#import -#import - -@protocol GADNativeAdDelegate; - -/// Native ad base class. All native ad types are subclasses of this class. -@interface GADNativeAd : NSObject - -/// Optional delegate to receive state change notifications. -@property(nonatomic, weak, nullable) id delegate; - -/// Reference to a root view controller that is used by the ad to present full screen content after -/// the user interacts with the ad. The root view controller is most commonly the view controller -/// displaying the ad. -@property(nonatomic, weak, nullable) UIViewController *rootViewController; - -/// Dictionary of assets which aren't processed by the receiver. -@property(nonatomic, readonly, copy, nullable) NSDictionary *extraAssets; - -/// Information about the ad response that returned the ad. -@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; - -/// 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 GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use responseInfo.adNetworkClassName."); - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h deleted file mode 100644 index 4d96e2d2c..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// GADNativeAdDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import - -@class GADNativeAd; - -/// Identifies native ad assets. -@protocol GADNativeAdDelegate - -@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 mediation ads. -- (void)nativeAdDidRecordImpression:(nonnull GADNativeAd *)nativeAd; - -/// Called when a click is recorded for an ad. Only called for Google ads and is not supported for -/// mediation ads. -- (void)nativeAdDidRecordClick:(nonnull GADNativeAd *)nativeAd; - -#pragma mark Click-Time Lifecycle Notifications - -/// Called just before presenting the user a full screen view, such as a browser, in response to -/// clicking on an ad. 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 end. The next method called will be the -/// applicationWillResignActive: of your UIApplicationDelegate object.Immediately after that, -/// nativeAdWillLeaveApplication: is called. -- (void)nativeAdWillPresentScreen:(nonnull GADNativeAd *)nativeAd; - -/// Called just before dismissing a full screen view. -- (void)nativeAdWillDismissScreen:(nonnull GADNativeAd *)nativeAd; - -/// Called just after dismissing a full screen view. Use this opportunity to restart anything you -/// may have stopped as part of nativeAdWillPresentScreen:. -- (void)nativeAdDidDismissScreen:(nonnull GADNativeAd *)nativeAd; - -/// Called just 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:(nonnull GADNativeAd *)nativeAd; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h deleted file mode 100644 index bced407fb..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// GADNativeAdImageAdLoaderOptions.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import - -/// Native ad image orientation preference. -typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { - GADNativeAdImageAdLoaderOptionsOrientationAny = 1, ///< No orientation preference. - GADNativeAdImageAdLoaderOptionsOrientationPortrait = 2, ///< Prefer portrait images. - GADNativeAdImageAdLoaderOptionsOrientationLandscape = 3 ///< Prefer landscape images. -}; - -/// Ad loader options for native ad image settings. -@interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions - -/// Indicates whether image asset content should be loaded by the SDK. If set to YES, the SDK will -/// not load image asset content and native ad image URLs can be used to fetch content. Defaults to -/// NO, image assets are loaded by the SDK. -@property(nonatomic, assign) BOOL disableImageLoading; - -/// Indicates whether multiple images should be loaded for each asset. Defaults to NO. -@property(nonatomic, assign) BOOL shouldRequestMultipleImages; - -#pragma mark - Deprecated - -/// Indicates preferred image orientation. Defaults to -/// GADNativeAdImageAdLoaderOptionsOrientationAny. -@property(nonatomic, assign) - GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation DEPRECATED_MSG_ATTRIBUTE( - "Use the mediaAspectRatio property from GADNativeAdMediaAdLoaderOptions instead."); - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h deleted file mode 100644 index 9c1cfa057..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// GADNativeExpressAdView.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import -#import -#import -#import -#import - -/// A view that displays native express ads. -GAD_DEPRECATED_ATTRIBUTE -@interface GADNativeExpressAdView : UIView - -#pragma mark - Initialization - -/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at -/// |origin| relative to its superview bounds. Returns nil if |adSize| is an invalid ad size. -- (nullable instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; - -/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at the -/// top left of its superview. Returns nil if |adSize| is an invalid ad size. -- (nullable instancetype)initWithAdSize:(GADAdSize)adSize; - -/// Video controller for controlling video rendered by this native express ad view. -@property(nonatomic, readonly, nonnull) GADVideoController *videoController; - -#pragma mark - Pre-Request - -/// Required value created on the AdMob website. Create a new ad unit for every unique placement of -/// an ad in your application. Set this to the ID assigned for this placement. Ad units are -/// important for targeting and statistics. -/// -/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" -@property(nonatomic, copy, nullable) IBInspectable NSString *adUnitID; - -/// Required reference to the current root view controller. For example, the root view controller in -/// a tab-based application would be the UITabViewController. -@property(nonatomic, weak, nullable) IBOutlet UIViewController *rootViewController; - -/// Required to set this native ad view to a proper size. Never create your own GADAdSize directly. -/// Use one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the -/// GADAdSizeFromCGSize method. If you are not using mediation, changing the adSize after an ad has -/// been shown will cause a new request (for an ad of the new size) to be sent. If you are using -/// mediation, then a new request may not be sent. -@property(nonatomic, assign) GADAdSize adSize; - -/// Optional delegate object that receives state change notifications from this -/// GADNativeExpressAdView. Typically this is a UIViewController. -@property(nonatomic, weak, nullable) IBOutlet id delegate; - -/// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If -/// enabled, you do not need to call the loadRequest: method to load ads. -@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled; - -/// Sets options that configure ad loading. -/// -/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option -/// objects cannot be modified after calling this method. -- (void)setAdOptions:(nonnull NSArray *)adOptions; - -#pragma mark - Making an Ad Request - -/// Makes an ad request. The request object supplies targeting information. -- (void)loadRequest:(nullable GADRequest *)request; - -#pragma mark - Mediation - -/// The name of the ad network adapter class that fetched the current ad. Returns nil while the -/// latest ad request is in progress or if the latest ad request failed. 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, weak, nullable) NSString *adNetworkClassName; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h deleted file mode 100644 index 1a6a947f0..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// GADNativeExpressAdViewDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import -#import - -@class GADNativeExpressAdView; - -/// Delegate methods for receiving GADNativeExpressAdView state change messages such as ad request -/// status and ad click lifecycle. -@protocol GADNativeExpressAdViewDelegate - -@optional - -#pragma mark Ad Request Lifecycle Notifications - -/// Tells the delegate that the native express ad view successfully received an ad. The delegate may -/// want to add the native express ad view to the view hierarchy if it hasn't been added yet. -- (void)nativeExpressAdViewDidReceiveAd:(nonnull GADNativeExpressAdView *)nativeExpressAdView; - -/// Tells the delegate that an ad request failed. The failure is normally due to network -/// connectivity or ad availablility (i.e., no fill). -- (void)nativeExpressAdView:(nonnull GADNativeExpressAdView *)nativeExpressAdView - didFailToReceiveAdWithError:(nonnull GADRequestError *)error; - -#pragma mark Click-Time Lifecycle Notifications - -/// Tells the delegate that a full screen view will be presented in response to the user clicking on -/// an ad. The delegate may want to pause animations and time sensitive interactions. -- (void)nativeExpressAdViewWillPresentScreen:(nonnull GADNativeExpressAdView *)nativeExpressAdView; - -/// Tells the delegate that the full screen view will be dismissed. -- (void)nativeExpressAdViewWillDismissScreen:(nonnull GADNativeExpressAdView *)nativeExpressAdView; - -/// Tells the delegate that the full screen view has been dismissed. The delegate should restart -/// anything paused while handling adViewWillPresentScreen:. -- (void)nativeExpressAdViewDidDismissScreen:(nonnull GADNativeExpressAdView *)nativeExpressAdView; - -/// Tells the delegate that the user click will open another app, backgrounding the current -/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, -/// are called immediately before this method is called. -- (void)nativeExpressAdViewWillLeaveApplication: - (nonnull GADNativeExpressAdView *)nativeExpressAdView; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h deleted file mode 100644 index 4d3b88c1e..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// GADRewardBasedVideoAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import -#import -#import -#import -#import -#import - -/// The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. -/// This class isn't thread safe. -GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use GADRewardedAd instead. Google AdMob publishers, follow instructions here: " - "https://googlemobileadssdk.page.link/admob-ios-rewarded-migration. " - "Google Ad Manager publishers, follow instructions here: " - "https://googlemobileadssdk.page.link/admanager-ios-rewarded-migration.") -@interface GADRewardBasedVideoAd : NSObject - -/// Delegate for receiving video notifications. -@property(nonatomic, weak, nullable) id delegate; - -/// Indicates whether the receiver is ready to be presented full screen. -@property(nonatomic, readonly, getter=isReady) BOOL ready; - -/// The ad network class name that fetched the current ad. Returns nil while the latest ad request -/// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob -/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom -/// events, this property returns the mediated custom event adapter. -@property(nonatomic, readonly, copy, nullable) NSString *adNetworkClassName; - -/// A unique identifier used to identify the user when making server-side verification 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, nullable) NSString *userIdentifier; - -/// Optional custom reward string to include in the server-side verification callback. -@property(nonatomic, copy, nullable) NSString *customRewardString; - -/// The loaded ad's metadata. Is nil if no ad is loaded or the loaded ad doesn't have metadata. Ad -/// metadata may update after loading. Use the rewardBasedVideoAdMetadataDidChange: delegate method -/// on GADRewardBasedVideoAdDelegate to listen for updates. -@property(nonatomic, readonly, nullable) NSDictionary *adMetadata; - -/// Returns the shared GADRewardBasedVideoAd instance. -+ (nonnull GADRewardBasedVideoAd *)sharedInstance; - -/// Initiates the request to fetch the reward based video ad. The |request| object supplies ad -/// targeting information and must not be nil. The adUnitID is the ad unit id used for fetching an -/// ad and must not be nil. -- (void)loadRequest:(nonnull GADRequest *)request withAdUnitID:(nonnull NSString *)adUnitID; - -/// Presents the reward based video ad with the provided view controller. -- (void)presentFromRootViewController:(nonnull UIViewController *)viewController; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h deleted file mode 100644 index be9849972..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// GADRewardBasedVideoAdDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google LLC. All rights reserved. -// - -#import -#import - -@class GADRewardBasedVideoAd; - -/// Delegate for receiving state change messages from a GADRewardBasedVideoAd such as ad requests -/// succeeding/failing. -@protocol GADRewardBasedVideoAdDelegate - -@required - -/// Tells the delegate that the reward based video ad has rewarded the user. -- (void)rewardBasedVideoAd:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd - didRewardUserWithReward:(nonnull GADAdReward *)reward; - -@optional - -/// Tells the delegate that the reward based video ad failed to load. -- (void)rewardBasedVideoAd:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd - didFailToLoadWithError:(nonnull NSError *)error; - -/// Tells the delegate that a reward based video ad was received. -- (void)rewardBasedVideoAdDidReceiveAd:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad opened. -- (void)rewardBasedVideoAdDidOpen:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad started playing. -- (void)rewardBasedVideoAdDidStartPlaying:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad completed playing. -- (void)rewardBasedVideoAdDidCompletePlaying:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad closed. -- (void)rewardBasedVideoAdDidClose:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad will leave the application. -- (void)rewardBasedVideoAdWillLeaveApplication:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -/// Tells the delegate that the reward based video ad's metadata changed. Called when an ad loads, -/// and when a loaded ad's metadata changes. -- (void)rewardBasedVideoAdMetadataDidChange:(nonnull GADRewardBasedVideoAd *)rewardBasedVideoAd; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAd.h deleted file mode 100644 index 12394d42a..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAd.h +++ /dev/null @@ -1,86 +0,0 @@ -// -// GADRewardedAd.h -// Google Mobile Ads SDK -// -// Copyright 2018 Google LLC. All rights reserved. -// - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import - -/// A block to be executed when the ad request operation completes. If the load failed, the error -/// object is non-null and provides failure information. On success, |error| is nil. -typedef void (^GADRewardedAdLoadCompletionHandler)(GADRequestError *_Nullable error); - -/// A rewarded ad. Rewarded ads are ads that users have the option of interacting with in exchange -/// for in-app rewards. See https://developers.google.com/admob/ios/rewarded-ads to get started. -@interface GADRewardedAd : NSObject - -/// Initializes a rewarded ad with the provided ad unit ID. Create ad unit IDs using the AdMob -/// website for each unique ad placement in your app. Unique ad units improve targeting and -/// statistics. -/// -/// Example AdMob ad unit ID: @"ca-app-pub-3940256099942544/1712485313" -- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID; - -/// Requests an rewarded ad and calls the provided completion handler when the request finishes. -- (void)loadRequest:(nullable GADRequest *)request - completionHandler:(nullable GADRewardedAdLoadCompletionHandler)completionHandler; - -/// The ad unit ID. -@property(nonatomic, readonly, nonnull) NSString *adUnitID; - -/// Indicates whether the rewarded ad is ready to be presented. -@property(nonatomic, readonly, getter=isReady) BOOL ready; - -/// Information about the ad response that returned the current ad or an error. Nil until the first -/// ad request succeeds or fails. -@property(nonatomic, readonly, nullable) GADResponseInfo *responseInfo; - -/// The reward earned by the user for interacting with a rewarded ad. Is nil until the ad has -/// successfully loaded. -@property(nonatomic, readonly, nullable) GADAdReward *reward; - -/// Options specified for server-side user reward verification. -@property(nonatomic, nullable) GADServerSideVerificationOptions *serverSideVerificationOptions; - -/// The loaded ad's metadata. Is nil if no ad is loaded or the loaded ad doesn't have metadata. Ad -/// metadata may update after loading. Use the rewardedAdMetadataDidChange: delegate method on -/// GADRewardedAdMetadataDelegate to listen for updates. -@property(nonatomic, readonly, nullable) NSDictionary *adMetadata; - -/// Delegate for ad metadata changes. -@property(nonatomic, weak, nullable) id adMetadataDelegate; - -/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. -@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; - -/// Returns whether the rewarded ad can be presented from the provided root view controller. Sets -/// the error out parameter if the rewarded ad can't be presented. Must be called on the main -/// thread. -- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController - error:(NSError *_Nullable __autoreleasing *_Nullable)error; - -/// Presents the rewarded ad with the provided view controller and rewarded delegate to call back on -/// various intermission events. The delegate is strongly retained by the receiver until a terminal -/// delegate method is called. Terminal methods are -rewardedAd:didFailToPresentWithError: and -/// -rewardedAdDidClose: of GADRewardedAdDelegate. -- (void)presentFromRootViewController:(nonnull UIViewController *)viewController - delegate:(nonnull id)delegate; - -#pragma mark Deprecated - -/// Deprecated. Use responseInfo.adNetworkClassName instead. -@property(nonatomic, readonly, copy, nullable) - NSString *adNetworkClassName GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use responseInfo.adNetworkClassName."); - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdDelegate.h deleted file mode 100644 index 9dc5d858a..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdDelegate.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// GADRewardedDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2018 Google LLC. All rights reserved. -// - -#import -#import -#import - -@class GADRewardedAd; - -/// Delegate for receiving state change messages from a GADRewardedAd. -@protocol GADRewardedAdDelegate - -@required - -/// Tells the delegate that the user earned a reward. -- (void)rewardedAd:(nonnull GADRewardedAd *)rewardedAd - userDidEarnReward:(nonnull GADAdReward *)reward; - -@optional - -/// Tells the delegate that the rewarded ad failed to present. -- (void)rewardedAd:(nonnull GADRewardedAd *)rewardedAd - didFailToPresentWithError:(nonnull NSError *)error; - -/// Tells the delegate that the rewarded ad was presented. -- (void)rewardedAdDidPresent:(nonnull GADRewardedAd *)rewardedAd; - -/// Tells the delegate that the rewarded ad was dismissed. -- (void)rewardedAdDidDismiss:(nonnull GADRewardedAd *)rewardedAd; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdMetadataDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdMetadataDelegate.h deleted file mode 100644 index e4101fcef..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRewardedAdMetadataDelegate.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GADRewardedAdMetadataDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2018 Google LLC. All rights reserved. -// - -#import -#import - -@class GADRewardedAd; - -/// Delegate for receiving metadata change messages from a GADRewardedAd. -@protocol GADRewardedAdMetadataDelegate - -@optional - -/// Tells the delegate that the rewarded ad's metadata changed. Called when an ad loads, and when a -/// loaded ad's metadata changes. -- (void)rewardedAdMetadataDidChange:(nonnull GADRewardedAd *)rewardedAd; - -@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h deleted file mode 100644 index 6216a573b..000000000 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// GADUnifiedNativeAdAssetIdentifiers.h -// Google Mobile Ads SDK -// -// Copyright 2017 Google LLC. All rights reserved. -// - -#import -#import - -typedef NSString *GADUnifiedNativeAssetIdentifier NS_STRING_ENUM; - -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeHeadlineAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeCallToActionAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeIconAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeBodyAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStoreAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativePriceAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeImageAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStarRatingAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdvertiserAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeMediaViewAsset; -GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdChoicesViewAsset; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/Info.plist new file mode 100644 index 000000000..628b88542 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/Info.plist @@ -0,0 +1,41 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + GoogleMobileAds.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + GoogleMobileAds.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/GoogleMobileAds b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/GoogleMobileAds similarity index 63% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/GoogleMobileAds rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/GoogleMobileAds index 060fe2a50..c8b895bbf 100644 Binary files a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/GoogleMobileAds and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/GoogleMobileAds differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdChoicesView.h similarity index 68% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdChoicesView.h index 569dec185..6bc2d93ef 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdChoicesView.h @@ -9,8 +9,8 @@ /// Displays AdChoices content. /// -/// If a GADAdChoicesView is set on GADUnifiedNativeAdView prior to calling -setNativeAd:, AdChoices +/// If a GADAdChoicesView is set on GADNativeAdView prior to calling -setNativeAd:, AdChoices /// content will render inside the GADAdChoicesView. By default, AdChoices is placed in the top -/// right corner of GADUnifiedNativeAdView. +/// right corner of GADNativeAdView. @interface GADAdChoicesView : UIView @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdFormat.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdFormat.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdFormat.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdFormat.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoader.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoader.h similarity index 97% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoader.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoader.h index dec1aafb3..aaadacd65 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoader.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoader.h @@ -9,7 +9,6 @@ #import #import #import -#import #import /// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h similarity index 56% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h index fb6e2cb43..e317b132e 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h @@ -11,14 +11,13 @@ typedef NSString *GADAdLoaderAdType NS_STRING_ENUM; /// Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader's -/// delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. See -/// GADNativeCustomTemplateAd.h. -GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeNativeCustomTemplate; +/// delegate must conform to the GADCustomNativeAdLoaderDelegate protocol. See GADCustomNativeAd.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeCustomNative; /// Use with GADAdLoader to request Google Ad Manager banner ads. To receive ads, the ad loader's -/// delegate must conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h. -GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeDFPBanner; +/// delegate must conform to the GAMBannerAdLoaderDelegate protocol. See GAMBannerView.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeGAMBanner; /// 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 _Nonnull const kGADAdLoaderAdTypeUnifiedNative; +/// conform to the GADNativeAdLoaderDelegate protocol. See GADNativeAd.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeNative; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h similarity index 83% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h index 64cde46d3..559b337de 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h @@ -6,7 +6,6 @@ // #import -#import @class GADAdLoader; @@ -16,7 +15,7 @@ /// Called when adLoader fails to load an ad. - (void)adLoader:(nonnull GADAdLoader *)adLoader - didFailToReceiveAdWithError:(nonnull GADRequestError *)error; + didFailToReceiveAdWithError:(nonnull NSError *)error; @optional diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdMetadata.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdMetadata.h new file mode 100644 index 000000000..167fde460 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdMetadata.h @@ -0,0 +1,33 @@ +// +// GADAdMetadata.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import + +/// Ad metadata key type. +typedef NSString *GADAdMetadataKey NS_STRING_ENUM; + +@protocol GADAdMetadataDelegate; + +/// Protocol for ads that provide ad metadata. +@protocol GADAdMetadataProvider + +/// The ad's metadata. Use adMetadataDelegate to receive ad metadata change messages. +@property(nonatomic, readonly, nullable) NSDictionary *adMetadata; + +/// Delegate for receiving ad metadata changes. +@property(nonatomic, weak, nullable) id adMetadataDelegate; + +@end + +/// Delegate protocol for receiving ad metadata change messages from a GADAdMetadataProvider. +@protocol GADAdMetadataDelegate + +/// Tells the delegate that the ad's metadata changed. Called when an ad loads and when a loaded +/// ad's metadata changes. +- (void)adMetadataDidChange:(nonnull id)ad; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdReward.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdReward.h similarity index 82% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdReward.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdReward.h index 8dbe6ff1b..85654659e 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdReward.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdReward.h @@ -7,7 +7,10 @@ #import -/// Reward information for GADRewardBasedVideoAd ads. +/// A block to be executed when the user earns a reward. +typedef void (^GADUserDidEarnRewardHandler)(void); + +/// Ad reward information. @interface GADAdReward : NSObject /// Type of the reward. diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdSize.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdSize.h similarity index 90% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdSize.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdSize.h index 52b0dfba9..d0d4aaa64 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdSize.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdSize.h @@ -50,14 +50,6 @@ GAD_EXTERN GADAdSize const kGADAdSizeLeaderboard; /// 120x600. GAD_EXTERN GADAdSize const kGADAdSizeSkyscraper; -/// An ad size that spans the full width of the application in portrait orientation. The height is -/// typically 50 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. -GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait; - -/// An ad size that spans the full width of the application in landscape orientation. The height is -/// typically 32 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. -GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape; - /// An ad size that spans the full width of its container, with a height dynamically determined by /// the ad. GAD_EXTERN GADAdSize const kGADAdSizeFluid; @@ -126,11 +118,14 @@ GAD_EXTERN NSValue *_Nonnull NSValueFromGADAdSize(GADAdSize size); /// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize. GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *_Nonnull value); -#pragma mark Deprecated Macros +#pragma mark Deprecated -#define GAD_SIZE_320x50 CGSizeFromGADAdSize(kGADAdSizeBanner) -#define GAD_SIZE_320x100 CGSizeFromGADAdSize(kGADAdSizeLargeBanner) -#define GAD_SIZE_300x250 CGSizeFromGADAdSize(kGADAdSizeMediumRectangle) -#define GAD_SIZE_468x60 CGSizeFromGADAdSize(kGADAdSizeFullBanner) -#define GAD_SIZE_728x90 CGSizeFromGADAdSize(kGADAdSizeLeaderboard) -#define GAD_SIZE_120x600 CGSizeFromGADAdSize(kGADAdSizeSkyscraper) +/// An ad size that spans the full width of the application in portrait orientation. The height is +/// typically 50 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth."); + +/// An ad size that spans the full width of the application in landscape orientation. The height is +/// typically 32 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth"); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdValue.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdValue.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAdValue.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAdValue.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h similarity index 82% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h index df39218de..119eebe24 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h @@ -2,13 +2,13 @@ // GADAppEventDelegate.h // Google Mobile Ads SDK // -// Copyright 2012 Google LLC. All rights reserved. +// Copyright 2020 Google LLC. All rights reserved. // #import @class GADBannerView; -@class GADInterstitial; +@class GADInterstitialAd; /// Implement your app event within these methods. The delegate will be notified when the SDK /// receives an app event message from the ad. @@ -22,7 +22,7 @@ withInfo:(nullable NSString *)info; /// Called when the interstitial receives an app event. -- (void)interstitial:(nonnull GADInterstitial *)interstitial +- (void)interstitialAd:(nonnull GADInterstitialAd *)interstitialAd didReceiveAppEvent:(nonnull NSString *)name withInfo:(nullable NSString *)info; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAppOpenAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAppOpenAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAppOpenAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAppOpenAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerView.h similarity index 68% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerView.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerView.h index 20727035b..284e29429 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerView.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerView.h @@ -9,9 +9,7 @@ #import #import #import -#import #import -#import #import #import @@ -75,27 +73,4 @@ /// Called when ad is estimated to have earned money. Available for allowlisted accounts only. @property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; -#pragma mark Deprecated - -/// Indicates whether the currently displayed ad (or most recent failure) was a result of auto -/// refreshing as specified on server. This property is set to NO after each loadRequest: method. -@property(nonatomic, readonly, assign) BOOL hasAutoRefreshed GAD_DEPRECATED_ATTRIBUTE; - -/// Deprecated delegate. GADInAppPurchase is deprecated. -@property(nonatomic, weak, nullable) IBOutlet id inAppPurchaseDelegate - GAD_DEPRECATED_ATTRIBUTE; - -/// The mediated ad network's underlying ad view. You may use this property to read the ad's actual -/// size and adjust this banner view's frame origin. However, modifying the banner view's frame size -/// triggers the Mobile Ads SDK to request a new ad. Only update the banner view's frame origin. -@property(nonatomic, readonly, weak, nullable) - UIView *mediatedAdView GAD_DEPRECATED_MSG_ATTRIBUTE("Use responseInfo.adNetworkClassName."); - -/// The ad network class name that fetched the current ad. Returns nil while the latest ad request -/// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob -/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom -/// events, this property returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, nullable) NSString *adNetworkClassName GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use responseInfo.adNetworkClassName."); - @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h similarity index 58% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h index f114bc6db..090b7b639 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h @@ -6,7 +6,6 @@ // #import -#import @class GADBannerView; @@ -20,32 +19,27 @@ /// Tells the delegate that an ad request successfully received an ad. The delegate may want to add /// the banner view to the view hierarchy if it hasn't been added yet. -- (void)adViewDidReceiveAd:(nonnull GADBannerView *)bannerView; +- (void)bannerViewDidReceiveAd:(nonnull GADBannerView *)bannerView; /// Tells the delegate that an ad request failed. The failure is normally due to network /// connectivity or ad availablility (i.e., no fill). -- (void)adView:(nonnull GADBannerView *)bannerView - didFailToReceiveAdWithError:(nonnull GADRequestError *)error; +- (void)bannerView:(nonnull GADBannerView *)bannerView + didFailToReceiveAdWithError:(nonnull NSError *)error; /// Tells the delegate that an impression has been recorded for an ad. -- (void)adViewDidRecordImpression:(nonnull GADBannerView *)bannerView; +- (void)bannerViewDidRecordImpression:(nonnull GADBannerView *)bannerView; #pragma mark Click-Time Lifecycle Notifications /// Tells the delegate that a full screen view will be presented in response to the user clicking on /// an ad. The delegate may want to pause animations and time sensitive interactions. -- (void)adViewWillPresentScreen:(nonnull GADBannerView *)bannerView; +- (void)bannerViewWillPresentScreen:(nonnull GADBannerView *)bannerView; /// Tells the delegate that the full screen view will be dismissed. -- (void)adViewWillDismissScreen:(nonnull GADBannerView *)bannerView; +- (void)bannerViewWillDismissScreen:(nonnull GADBannerView *)bannerView; /// Tells the delegate that the full screen view has been dismissed. The delegate should restart -/// anything paused while handling adViewWillPresentScreen:. -- (void)adViewDidDismissScreen:(nonnull GADBannerView *)bannerView; - -/// Tells the delegate that the user click will open another app, backgrounding the current -/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, -/// are called immediately before this method is called. -- (void)adViewWillLeaveApplication:(nonnull GADBannerView *)bannerView; +/// anything paused while handling bannerViewWillPresentScreen:. +- (void)bannerViewDidDismissScreen:(nonnull GADBannerView *)bannerView; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h similarity index 98% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h index 95714c28c..db88e1f03 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h @@ -8,6 +8,8 @@ #import #import +#import + @protocol GADCustomEventBanner; /// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h similarity index 83% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h index 5ba619226..da7fed1b7 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h @@ -44,12 +44,4 @@ /// Indicates whether 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, nullable) NSDate *userBirthday GAD_DEPRECATED_ATTRIBUTE; - @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h similarity index 52% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h index 761a0c1c0..0998b39ea 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h @@ -1,5 +1,5 @@ // -// GADNativeCustomTemplateAd.h +// GADCustomNativeAd.h // Google Mobile Ads SDK // // Copyright 2015 Google LLC. All rights reserved. @@ -9,8 +9,8 @@ #import #import #import -#import #import +#import #import #import @@ -18,28 +18,30 @@ typedef void (^GADNativeAdCustomClickHandler)(NSString *_Nonnull assetID); /// Asset key for the GADMediaView asset view. -GAD_EXTERN NSString *_Nonnull const GADNativeCustomTemplateAdMediaViewKey; +GAD_EXTERN NSString *_Nonnull const GADCustomNativeAdMediaViewKey; -/// Native custom template ad. To request this ad type, you need to pass -/// kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter +@protocol GADCustomNativeAdDelegate; + +/// Custom native ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeCustomNative (see GADAdLoaderAdTypes.h) to the |adTypes| parameter /// in GADAdLoader's initializer method. If you request this ad type, your delegate must conform to -/// the GADNativeCustomTemplateAdLoaderDelegate protocol. -@interface GADNativeCustomTemplateAd : GADNativeAd +/// the GADCustomNativeAdLoaderDelegate protocol. +@interface GADCustomNativeAd : NSObject -/// The ad's custom template ID. -@property(nonatomic, readonly, nonnull) NSString *templateID; +/// The ad's format ID. +@property(nonatomic, readonly, nonnull) NSString *formatID; /// Array of available asset keys. @property(nonatomic, readonly, nonnull) NSArray *availableAssetKeys; /// Returns media view for rendering video loaded by the receiver. Returns nil if receiver doesn't -/// has a video. +/// have a video. @property(nonatomic, readonly, nullable) GADMediaView *mediaView; -/// Custom click handler. Set this property only if this template ad is configured with a custom -/// click action, otherwise set it to nil. If this property is set to a non-nil value, the ad's -/// built-in click actions are ignored and |customClickHandler| is executed when a click on the -/// asset is received. +/// Custom click handler. Set this property only if this ad is configured with a custom click +/// action, otherwise set it to nil. If this property is set to a non-nil value, the ad's built-in +/// click actions are ignored and |customClickHandler| is executed when a click on the asset is +/// received. @property(atomic, copy, nullable) GADNativeAdCustomClickHandler customClickHandler; /// The display ad measurement associated with this ad. @@ -48,6 +50,17 @@ GAD_EXTERN NSString *_Nonnull const GADNativeCustomTemplateAdMediaViewKey; /// Media content. @property(nonatomic, readonly, nonnull) GADMediaContent *mediaContent; +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak, nullable) id delegate; + +/// Reference to a root view controller that is used by the ad to present full screen content after +/// the user interacts with the ad. The root view controller is most commonly the view controller +/// displaying the ad. +@property(nonatomic, weak, nullable) UIViewController *rootViewController; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + /// Returns the native ad image corresponding to the specified key or nil if the image is not /// available. - (nullable GADNativeAdImage *)imageForKey:(nonnull NSString *)key; @@ -64,36 +77,20 @@ GAD_EXTERN NSString *_Nonnull const GADNativeCustomTemplateAdMediaViewKey; /// first impression is recorded. - (void)recordImpression; -#pragma mark - Deprecated - -/// Returns video controller for controlling receiver's video. -@property(nonatomic, readonly, nonnull) - GADVideoController *videoController GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use the videoController property from the ad's mediaContent instead."); - -/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user -/// interacted with. Provide |customClickHandler| only if this template is configured with a custom -/// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are -/// ignored and |customClickHandler| is executed after recording the click. -/// -/// This method is deprecated. See performClickOnAssetWithKey: API. -- (void)performClickOnAssetWithKey:(nonnull NSString *)assetKey - customClickHandler:(nullable dispatch_block_t)customClickHandler - GAD_DEPRECATED_MSG_ATTRIBUTE("Use performClickOnAssetWithKey:."); - @end #pragma mark - Loading Protocol /// The delegate of a GADAdLoader object implements this protocol to receive -/// GADNativeCustomTemplateAd ads. -@protocol GADNativeCustomTemplateAdLoaderDelegate +/// GADCustomNativeAd ads. +@protocol GADCustomNativeAdLoaderDelegate -/// Called when requesting an ad. Asks the delegate for an array of custom template ID strings. -- (nonnull NSArray *)nativeCustomTemplateIDsForAdLoader:(nonnull GADAdLoader *)adLoader; +/// Called when requesting an ad. Asks the delegate for an array of custom native ad format ID +/// strings. +- (nonnull NSArray *)customNativeAdFormatIDsForAdLoader:(nonnull GADAdLoader *)adLoader; -/// Tells the delegate that a native custom template ad was received. +/// Tells the delegate that a custom native ad was received. - (void)adLoader:(nonnull GADAdLoader *)adLoader - didReceiveNativeCustomTemplateAd:(nonnull GADNativeCustomTemplateAd *)nativeCustomTemplateAd; + didReceiveCustomNativeAd:(nonnull GADCustomNativeAd *)customNativeAd; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h new file mode 100644 index 000000000..7cbc8d943 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h @@ -0,0 +1,43 @@ +// +// GADCustomNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +@class GADCustomNativeAd; + +/// Identifies native ad assets. +@protocol GADCustomNativeAdDelegate + +@optional + +#pragma mark Ad Lifecycle Events + +/// Called when an impression is recorded for a custom native ad. +- (void)customNativeAdDidRecordImpression:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called when a click is recorded for a custom native ad. +- (void)customNativeAdDidRecordClick:(nonnull GADCustomNativeAd *)nativeAd; + +#pragma mark Click-Time Lifecycle Notifications + +/// Called just before presenting the user a full screen view, such as a browser, in response to +/// clicking on an ad. 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 customNativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks +/// on an App Store link, your application will end. The next method called will be the +/// applicationWillResignActive: of your UIApplicationDelegate object. +- (void)customNativeAdWillPresentScreen:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called just before dismissing a full screen view. +- (void)customNativeAdWillDismissScreen:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called just after dismissing a full screen view. Use this opportunity to restart anything you +/// may have stopped as part of customNativeAdWillPresentScreen:. +- (void)customNativeAdDidDismissScreen:(nonnull GADCustomNativeAd *)nativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h similarity index 98% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h index 7e0d53bca..b4ec12e2f 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h @@ -154,6 +154,9 @@ /// Indicates whether the CSA "longerHeadlines" parameter is enabled. @property(nonatomic, assign) BOOL longerHeadlinesExtensionEnabled; +/// The CSA "styleId" parameter. +@property(nonatomic, copy, nullable) NSString *styleID; + /// Sets an advanced option value for a specified key. The value must be an NSString or NSNumber. - (void)setAdvancedOptionValue:(nonnull id)value forKey:(nonnull NSString *)key; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADExtras.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADExtras.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADExtras.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h similarity index 90% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h index 33f384760..3e6c25373 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h @@ -27,6 +27,9 @@ @optional +/// Tells the delegate that an impression has been recorded for the ad. +- (void)adDidRecordImpression:(nonnull id)ad; + /// Tells the delegate that the ad failed to present full screen content. - (void)ad:(nonnull id)ad didFailToPresentFullScreenContentWithError:(nonnull NSError *)error; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInitializationStatus.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInitializationStatus.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADInitializationStatus.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInitializationStatus.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInterstitialAd.h new file mode 100644 index 000000000..d9f0ff80a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInterstitialAd.h @@ -0,0 +1,62 @@ +// +// GADInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import + +@class GADInterstitialAd; + +/// A block to be executed when the ad request operation completes. On success, +/// interstitialAd is non-nil and |error| is nil. On failure, interstitialAd is nil +/// and |error| is non-nil. +typedef void (^GADInterstitialAdLoadCompletionHandler)(GADInterstitialAd *_Nullable interstitialAd, + NSError *_Nullable error); + +/// An interstitial ad. This is a full-screen advertisement shown at natural transition points in +/// your application such as between game levels or news stories. See +/// https://developers.google.com/admob/ios/interstitial to get started. +@interface GADInterstitialAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads an interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADInterstitialAdLoadCompletionHandler)completionHandler; + +/// Returns whether the interstitial ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the interstitial ad. Must be called on the main thread. +/// +/// @param rootViewController A view controller to present the ad. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaContent.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaContent.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaContent.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaContent.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaView.h similarity index 90% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaView.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaView.h index 96333807a..2a8a6c5ed 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMediaView.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaView.h @@ -10,7 +10,7 @@ /// Displays native ad media content. /// -/// To display media content in GADUnifiedNativeAdView instances, add a GADMediaView subview, +/// To display media content in GADNativeAdView instances, add a GADMediaView subview, /// assign the native ad view's mediaView property, and set the native ad's mediaContent property to /// the media view. /// diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMobileAds.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMobileAds.h similarity index 70% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMobileAds.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMobileAds.h index a5beecbf7..b00468644 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMobileAds.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMobileAds.h @@ -6,6 +6,8 @@ // #import +#import + #import #import #import @@ -14,6 +16,10 @@ /// completes or times out. typedef void (^GADInitializationCompletionHandler)(GADInitializationStatus *_Nonnull status); +/// Completion handler for presenting Ad Inspector. Returns an error if a problem was detected +/// during presentation, or nil otherwise. +typedef void (^GADAdInspectorCompletionHandler)(NSError *_Nullable error); + /// Google Mobile Ads SDK settings. @interface GADMobileAds : NSObject @@ -58,15 +64,6 @@ typedef void (^GADInitializationCompletionHandler)(GADInitializationStatus *_Non /// request if this method is not called. - (void)startWithCompletionHandler:(nullable GADInitializationCompletionHandler)completionHandler; -/// Disables automated in-app purchase (IAP) reporting. IAP reporting is enabled by default but can -/// be disabled by calling this method before initializing the GMA SDK or loading ads. IAP reporting -/// is used to track IAP ad conversions. Don't disable reporting if you use IAP ads. -- (void)disableAutomatedInAppPurchaseReporting; - -/// Enables automated in-app purchase (IAP) reporting. IAP reporting is used to track IAP ad -/// conversions. -- (void)enableAutomatedInAppPurchaseReporting; - /// Disables automated SDK crash reporting. If not called, the SDK records the original exception /// handler if available and registers a new exception handler. The new exception handler only /// reports SDK related exceptions and calls the recorded original exception handler. @@ -78,22 +75,22 @@ typedef void (^GADInitializationCompletionHandler)(GADInitializationStatus *_Non /// initializing the GMA SDK or loading ads and has no effect once the SDK has been initialized. - (void)disableMediationInitialization; -#pragma mark Deprecated +/// Presents Ad Inspector. The device calling this API must be registered as a test device in order +/// to launch Ad Inspector. Set +/// GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers to enable test mode on +/// this device. +/// @param viewController A view controller to present Ad Inspector. +/// @param completionHandler A handler to execute when Ad Inspector is closed. +- (void)presentAdInspectorFromViewController:(nonnull UIViewController *)viewController + completionHandler: + (nullable GADAdInspectorCompletionHandler)completionHandler; -/// Configures the SDK using the settings associated with the given application ID. -+ (void)configureWithApplicationID:(nonnull NSString *)applicationID - GAD_DEPRECATED_MSG_ATTRIBUTE("Use [GADMobileAds.sharedInstance startWithCompletionHandler:]"); +#pragma mark Deprecated -/// Disables automated in-app purchase (IAP) reporting. IAP reporting is enabled by default but can -/// be disabled by calling this method before initializing the GMA SDK or loading ads. IAP reporting -/// is used to track IAP ad conversions. Don't disable reporting if you use IAP ads. -+ (void)disableAutomatedInAppPurchaseReporting GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use [GADMobileAds.sharedInstance disableAutomatedInAppPurchaseReporting]"); +/// Deprecated and does nothing. IAP transaction reporting is no longer supported. +- (void)disableAutomatedInAppPurchaseReporting GAD_DEPRECATED_ATTRIBUTE; -/// Disables automated SDK crash reporting. If not called, the SDK records the original exception -/// handler if available and registers a new exception handler. The new exception handler only -/// reports SDK related exceptions and calls the recorded original exception handler. -+ (void)disableSDKCrashReporting GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use [GADMobileAds.sharedInstance disableSDKCrashReporting]"); +/// Deprecated and does nothing. IAP transaction reporting is no longer supported. +- (void)enableAutomatedInAppPurchaseReporting GAD_DEPRECATED_ATTRIBUTE; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h similarity index 70% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h index 5913dbae1..ad9d4de99 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h @@ -1,19 +1,19 @@ // -// GADUnifiedNativeAd+ConfirmationClick.h +// GADNativeAd+ConfirmationClick.h // Google Mobile Ads SDK // // Copyright 2017 Google LLC. All rights reserved. // #import -#import -#import +#import +#import #import -@interface GADUnifiedNativeAd (ConfirmedClick) +@interface GADNativeAd (ConfirmedClick) /// Unconfirmed click delegate. -@property(nonatomic, weak, nullable) id +@property(nonatomic, weak, nullable) id unconfirmedClickDelegate; /// Registers a view that will confirm the click. diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+CustomClickGesture.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h similarity index 78% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+CustomClickGesture.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h index 295734856..8d4df3d6c 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+CustomClickGesture.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h @@ -1,13 +1,13 @@ // -// GADUnifiedNativeAd+CustomClickGesture.h +// GADNativeAd+CustomClickGesture.h // Google Mobile Ads SDK // // Copyright 2018 Google LLC. All rights reserved. // -#import +#import -@interface GADUnifiedNativeAd (CustomClickGesture) +@interface GADNativeAd (CustomClickGesture) /// Indicates whether the custom click gestures feature can be used. @property(nonatomic, readonly, getter=isCustomClickGestureEnabled) BOOL customClickGestureEnabled; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd.h similarity index 77% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd.h index 5f8c6e9ee..7ba84b953 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAd.h @@ -1,5 +1,5 @@ // -// GADUnifiedNativeAd.h +// GADNativeAd.h // Google Mobile Ads SDK // // Copyright 2017 Google LLC. All rights reserved. @@ -12,22 +12,22 @@ #import #import #import +#import +#import #import #import -#import -#import #import #import -/// Unified native ad. To request this ad type, pass kGADAdLoaderAdTypeUnifiedNative +/// Native ad. To request this ad type, pass kGADAdLoaderAdTypeNative /// (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 +/// you request this ad type, your delegate must conform to the GADNativeAdLoaderDelegate /// protocol. -@interface GADUnifiedNativeAd : NSObject +@interface GADNativeAd : NSObject #pragma mark - Must be displayed if available -/// Headline +/// Headline. @property(nonatomic, readonly, copy, nullable) NSString *headline; #pragma mark - Recommended to display @@ -55,7 +55,7 @@ #pragma mark - Other properties /// Optional delegate to receive state change notifications. -@property(nonatomic, weak, nullable) id delegate; +@property(nonatomic, weak, nullable) id delegate; /// Reference to a root view controller that is used by the ad to present full screen content after /// the user interacts with the ad. The root view controller is most commonly the view controller @@ -85,9 +85,9 @@ /// IDs. - (void)registerAdView:(nonnull UIView *)adView clickableAssetViews: - (nonnull NSDictionary *)clickableAssetViews + (nonnull NSDictionary *)clickableAssetViews nonclickableAssetViews: - (nonnull NSDictionary *)nonclickableAssetViews; + (nonnull NSDictionary *)nonclickableAssetViews; /// Unregisters ad view from this native ad. The corresponding asset views will also be /// unregistered. @@ -97,39 +97,24 @@ /// Call this method only if customMuteThisAdAvailable is YES. - (void)muteThisAdWithReason:(nullable GADMuteThisAdReason *)reason; -#pragma mark - Deprecated - -/// Video controller for controlling video playback in GADUnifiedNativeAdView's mediaView. -@property(nonatomic, readonly, nullable) - GADVideoController *videoController GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use the videoController property from the ad's mediaContent instead."); - -/// 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 GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use responseInfo.adNetworkClassName."); - @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:(nonnull GADAdLoader *)adLoader - didReceiveUnifiedNativeAd:(nonnull GADUnifiedNativeAd *)nativeAd; +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAd ads. +@protocol GADNativeAdLoaderDelegate +/// Called when a native ad is received. +- (void)adLoader:(nonnull GADAdLoader *)adLoader didReceiveNativeAd:(nonnull GADNativeAd *)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 +@interface GADNativeAdView : UIView -/// This property must point to the unified native ad object rendered by this ad view. -@property(nonatomic, strong, nullable) GADUnifiedNativeAd *nativeAd; +/// This property must point to the native ad object rendered by this ad view. +@property(nonatomic, strong, nullable) GADNativeAd *nativeAd; /// Weak reference to your ad view's headline asset view. @property(nonatomic, weak, nullable) IBOutlet UIView *headlineView; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h new file mode 100644 index 000000000..10e860d20 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h @@ -0,0 +1,23 @@ +// +// GADNativeAdAssetIdentifiers.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import + +typedef NSString *GADNativeAssetIdentifier NS_STRING_ENUM; + +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeHeadlineAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeCallToActionAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeIconAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeBodyAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStoreAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativePriceAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeImageAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStarRatingAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdvertiserAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeMediaViewAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdChoicesViewAsset; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h similarity index 59% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h index 29e60fbfb..245aa1acb 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h @@ -1,5 +1,5 @@ // -// GADUnifiedNativeAdDelegate.h +// GADNativeAdDelegate.h // Google Mobile Ads SDK // // Copyright 2017 Google LLC. All rights reserved. @@ -7,10 +7,10 @@ #import -@class GADUnifiedNativeAd; +@class GADNativeAd; /// Identifies native ad assets. -@protocol GADUnifiedNativeAdDelegate +@protocol GADNativeAdDelegate @optional @@ -18,11 +18,11 @@ /// Called when an impression is recorded for an ad. Only called for Google ads and is not supported /// for mediated ads. -- (void)nativeAdDidRecordImpression:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdDidRecordImpression:(nonnull GADNativeAd *)nativeAd; /// Called when a click is recorded for an ad. Only called for Google ads and is not supported for /// mediated ads. -- (void)nativeAdDidRecordClick:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdDidRecordClick:(nonnull GADNativeAd *)nativeAd; #pragma mark - Click-Time Lifecycle Notifications @@ -32,26 +32,20 @@ /// 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:(nonnull GADUnifiedNativeAd *)nativeAd; +/// applicationWillResignActive: of your UIApplicationDelegate object. +- (void)nativeAdWillPresentScreen:(nonnull GADNativeAd *)nativeAd; /// Called before dismissing a full screen view. -- (void)nativeAdWillDismissScreen:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdWillDismissScreen:(nonnull GADNativeAd *)nativeAd; /// Called after dismissing a full screen view. Use this opportunity to restart anything you may /// have stopped as part of nativeAdWillPresentScreen:. -- (void)nativeAdDidDismissScreen:(nonnull 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:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdDidDismissScreen:(nonnull GADNativeAd *)nativeAd; #pragma mark - Mute This Ad /// Used for Mute This Ad feature. Called after the native ad is muted. Only called for Google ads /// and is not supported for mediated ads. -- (void)nativeAdIsMuted:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdIsMuted:(nonnull GADNativeAd *)nativeAd; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImage.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdImage.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImage.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h new file mode 100644 index 000000000..136fab445 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h @@ -0,0 +1,21 @@ +// +// GADNativeAdImageAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +/// Ad loader options for native ad image settings. +@interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions + +/// Indicates whether image asset content should be loaded by the SDK. If set to YES, the SDK will +/// not load image asset content and native ad image URLs can be used to fetch content. Defaults to +/// NO, image assets are loaded by the SDK. +@property(nonatomic, assign) BOOL disableImageLoading; + +/// Indicates whether multiple images should be loaded for each asset. Defaults to NO. +@property(nonatomic, assign) BOOL shouldRequestMultipleImages; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h similarity index 51% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h index e1bb0ee74..fedabc80a 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h @@ -1,29 +1,29 @@ // -// GADUnifiedNativeAdUnconfirmedClickDelegate.h +// GADNativeAdUnconfirmedClickDelegate.h // Google Mobile Ads SDK // // Copyright 2017 Google LLC. All rights reserved. // #import -#import +#import -@class GADUnifiedNativeAd; +@class GADNativeAd; -/// Delegate methods for handling unified native ad unconfirmed clicks. -@protocol GADUnifiedNativeAdUnconfirmedClickDelegate +/// Delegate methods for handling native ad unconfirmed clicks. +@protocol GADNativeAdUnconfirmedClickDelegate /// 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 GADUnifiedNativeAd+ConfirmedClick.h to register +/// Use the -registerClickConfirmingView: method in GADNativeAd+ConfirmedClick.h to register /// a view that will confirm the click. Only called for Google ads and is not supported for mediated /// ads. -- (void)nativeAd:(nonnull GADUnifiedNativeAd *)nativeAd - didReceiveUnconfirmedClickOnAssetID:(nonnull GADUnifiedNativeAssetIdentifier)assetID; +- (void)nativeAd:(nonnull GADNativeAd *)nativeAd + didReceiveUnconfirmedClickOnAssetID:(nonnull GADNativeAssetIdentifier)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:(nonnull GADUnifiedNativeAd *)nativeAd; +- (void)nativeAdDidCancelUnconfirmedClick:(nonnull GADNativeAd *)nativeAd; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADPresentationError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADPresentationError.h similarity index 95% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADPresentationError.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADPresentationError.h index abaee40aa..a7ae1305a 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADPresentationError.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADPresentationError.h @@ -6,7 +6,6 @@ // #import -#import /// Error codes in the Google Mobile Ads SDK domain that surface due to errors when attempting to /// present an ad. diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequest.h similarity index 55% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequest.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequest.h index e642adabf..aff850443 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequest.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequest.h @@ -68,6 +68,11 @@ typedef NS_ENUM(NSInteger, GADGender) { /// is used for targeting and brand safety purposes. @property(nonatomic, copy, nullable) NSString *contentURL; +/// URL strings for non-primary web content near an ad. Promotes brand safety and allows displayed +/// ads to have an app level rating (MA, T, PG, etc) that is more appropriate to neighboring +/// content. +@property(nonatomic, copy, nullable) NSArray *neighboringContentURLStrings; + #pragma mark Request Agent Information /// String that identifies the ad request's origin. Third party libraries that reference the Mobile @@ -76,53 +81,4 @@ typedef NS_ENUM(NSInteger, GADGender) { /// Mobile Ads SDK should set this property as "CoolAds". @property(nonatomic, copy, nullable) NSString *requestAgent; -#pragma mark Deprecated Methods - -/// Test ads will be returned for devices with device IDs specified in this array. -/// Use GADRequestConfiguration instead. -@property(nonatomic, copy, nullable) NSArray *testDevices GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers."); - -/// Deprecated property. The user's gender. -@property(nonatomic, assign) GADGender gender GAD_DEPRECATED_ATTRIBUTE; - -/// Deprecated property. The user's birthday. -@property(nonatomic, copy, nullable) NSDate *birthday GAD_DEPRECATED_ATTRIBUTE; - -/// Returns the version of the SDK. -+ (nonnull NSString *) - sdkVersion GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADMobileAds.sharedInstance.sdkVersion"); - -/// Provide the user's birthday to increase ad relevancy. -- (void)setBirthdayWithMonth:(NSInteger)month - day:(NSInteger)day - 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". -- (void)setLocationWithDescription:(nullable NSString *)locationDescription - GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:."); - -/// [Optional] This method allows you to specify whether you would like your app to be treated as -/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA), -/// http://business.ftc.gov/privacy-and-security/childrens-privacy. -/// -/// If you call this method with YES, you are indicating that your app should be treated as -/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA). If you call -/// this method with NO, you are indicating that your app should not be treated as child-directed -/// for purposes of the Children’s Online Privacy Protection Act (COPPA). If you do not call this -/// method, ad requests will include no indication of how you would like your app treated with -/// respect to COPPA. -/// -/// By setting this method, you certify that this notification is accurate and you are authorized to -/// act on behalf of the owner of the app. You understand that abuse of this setting may result in -/// termination of your Google account. -/// -/// It may take some time for this designation to be fully implemented in applicable Google -/// services. This designation will only apply to ad requests for which you have set this method. -- (void)tagForChildDirectedTreatment:(BOOL)childDirectedTreatment - GAD_DEPRECATED_MSG_ATTRIBUTE( - " use [GADMobileAds.sharedInstance.requestConfiguration tagForChildDirectedTreatment]"); - @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequestError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequestError.h new file mode 100644 index 000000000..124ed64d0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRequestError.h @@ -0,0 +1,63 @@ +// +// GADRequestError.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import +#import + +/// Google AdMob Ads error domain. +GAD_EXTERN NSString *_Nonnull const GADErrorDomain; + +/// NSError codes for GAD error domain. +typedef NS_ENUM(NSInteger, GADErrorCode) { + /// The ad request is invalid. The localizedFailureReason error description will have more + /// details. Typically this is because the ad did not have the ad unit ID or root view + /// controller set. + GADErrorInvalidRequest = 0, + + /// The ad request was successful, but no ad was returned. + GADErrorNoFill = 1, + + /// There was an error loading data from the network. + GADErrorNetworkError = 2, + + /// The ad server experienced a failure processing the request. + GADErrorServerError = 3, + + /// The current device's OS is below the minimum required version. + GADErrorOSVersionTooLow = 4, + + /// The request was unable to be loaded before being timed out. + GADErrorTimeout = 5, + + /// The mediation response was invalid. + GADErrorMediationDataError = 7, + + /// Error finding or creating a mediation ad network adapter. + GADErrorMediationAdapterError = 8, + + /// Attempting to pass an invalid ad size to an adapter. + GADErrorMediationInvalidAdSize = 10, + + /// Internal error. + GADErrorInternalError = 11, + + /// Invalid argument error. + GADErrorInvalidArgument = 12, + + /// Received invalid response. + GADErrorReceivedInvalidResponse = 13, + + /// A mediation ad network adapter received an ad request, but did not fill. The adapter's error + /// is included as an underlyingError. + GADErrorMediationNoFill = 9, + + /// Will not send request because the ad object has already been used. + GADErrorAdAlreadyUsed = 19, + + /// Will not send request because the application identifier is missing. + GADErrorApplicationIdentifierMissing = 20, +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADResponseInfo.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADResponseInfo.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADResponseInfo.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADResponseInfo.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedAd.h new file mode 100644 index 000000000..89ef59c81 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedAd.h @@ -0,0 +1,73 @@ +// +// GADRewardedAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import + +@class GADRewardedAd; + +/// A block to be executed when the ad request operation completes. On success, +/// rewardedAd is non-nil and |error| is nil. On failure, rewardedAd is nil +/// and |error| is non-nil. +typedef void (^GADRewardedAdLoadCompletionHandler)(GADRewardedAd *_Nullable rewardedAd, + NSError *_Nullable error); + +/// A rewarded ad. Rewarded ads are ads that users have the option of interacting with in exchange +/// for in-app rewards. +@interface GADRewardedAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// The reward earned by the user for interacting with the ad. +@property(nonatomic, readonly, nonnull) GADAdReward *adReward; + +/// Options specified for server-side user reward verification. Must be set before presenting this +/// ad. +@property(nonatomic, copy, nullable) + GADServerSideVerificationOptions *serverSideVerificationOptions; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads a rewarded ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADRewardedAdLoadCompletionHandler)completionHandler; + +/// Returns whether the rewarded ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the rewarded ad. Must be called on the main thread. +/// +/// @param rootViewController A view controller to present the ad. +/// @param userDidEarnRewardHandler A handler to execute when the user earns a reward. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController + userDidEarnRewardHandler:(nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h new file mode 100644 index 000000000..242d8fac1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h @@ -0,0 +1,74 @@ +// +// GADRewardedInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import + +@class GADRewardedInterstitialAd; + +/// A block to be executed when the ad request operation completes. On success, +/// rewardedInterstitialAd is non-nil and |error| is nil. On failure, rewardedInterstitialAd is nil +/// and |error| is non-nil. +typedef void (^GADRewardedInterstitialAdLoadCompletionHandler)( + GADRewardedInterstitialAd *_Nullable rewardedInterstitialAd, NSError *_Nullable error); + +/// A rewarded interstitial ad. Rewarded Interstitial ads are full screen ads that can be presented +/// without user-opt in and allow you to reward the user with in-app items. +@interface GADRewardedInterstitialAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// The reward earned by the user for interacting with the ad. +@property(nonatomic, readonly, nonnull) GADAdReward *adReward; + +/// Options specified for server-side user reward verification. Must be set before presenting this +/// ad. +@property(nonatomic, copy, nullable) + GADServerSideVerificationOptions *serverSideVerificationOptions; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads a rewarded interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADRewardedInterstitialAdLoadCompletionHandler)completionHandler; + +/// Returns whether the rewarded interstitial ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the rewarded interstitial ad. Must be called on the main thread. +/// +/// @param viewController A view controller to present the ad. +/// @param userDidEarnRewardHandler A handler to execute when the user earns a reward. adReward +/// contains the reward information. +- (void)presentFromRootViewController:(nonnull UIViewController *)viewController + userDidEarnRewardHandler:(nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADSearchBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADSearchBannerView.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADSearchBannerView.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADSearchBannerView.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoController.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoController.h similarity index 76% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoController.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoController.h index 49cfb719c..36b31dd49 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoController.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoController.h @@ -39,14 +39,4 @@ /// Indicates whether video click to expand behavior is enabled. - (BOOL)clickToExpandEnabled; -#pragma mark - Deprecated - -/// Returns a Boolean indicating if the receiver has video content. -- (BOOL)hasVideoContent GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use the hasVideoContent property from GADUnifiedNativeAd's mediaContent instead."); - -/// Returns the video's aspect ratio (width/height) or 0 if no video is present. -- (double)aspectRatio GAD_DEPRECATED_MSG_ATTRIBUTE( - "Use the aspectRatio property from GADUnifiedNativeAd's mediaContent instead."); - @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoOptions.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADVideoOptions.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADVideoOptions.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerView.h similarity index 80% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerView.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerView.h index c24e05304..4d86dab20 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPBannerView.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerView.h @@ -1,5 +1,5 @@ // -// DFPBannerView.h +// GAMBannerView.h // Google Mobile Ads SDK // // Copyright 2012 Google LLC. All rights reserved. @@ -11,26 +11,26 @@ #import #import -@class DFPBannerView; +@class GAMBannerView; -/// The delegate of a GADAdLoader object must conform to this protocol to receive DFPBannerViews. -@protocol DFPBannerAdLoaderDelegate +/// The delegate of a GADAdLoader object must conform to this protocol to receive GAMBannerViews. +@protocol GAMBannerAdLoaderDelegate /// Asks the delegate which banner ad sizes should be requested. - (nonnull NSArray *)validBannerSizesForAdLoader:(nonnull GADAdLoader *)adLoader; /// Tells the delegate that a Google Ad Manager banner ad was received. - (void)adLoader:(nonnull GADAdLoader *)adLoader - didReceiveDFPBannerView:(nonnull DFPBannerView *)bannerView; + didReceiveGAMBannerView:(nonnull GAMBannerView *)bannerView; @end /// The view that displays Ad Manager banner ads. /// -/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (see +/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeGAMBanner (see /// GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If you -/// request this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol. -@interface DFPBannerView : GADBannerView +/// request this ad type, your delegate must conform to the GAMBannerAdLoaderDelegate protocol. +@interface GAMBannerView : GADBannerView /// Required value created on the Ad Manager website. Create a new ad unit for every unique /// placement of an ad in your application. Set this to the ID assigned for this placement. Ad units @@ -81,12 +81,4 @@ /// objects cannot be modified after calling this method. - (void)setAdOptions:(nonnull NSArray *)adOptions; -#pragma mark Deprecated - -/// Deprecated. Use the validAdSizes property. -/// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list -/// of GADAdSize pointers. -- (void)setValidAdSizesWithSizes:(nullable GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION - GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); - @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h new file mode 100644 index 000000000..f2ef92bae --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h @@ -0,0 +1,16 @@ +// +// GAMBannerViewOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Ad loader options for banner ads. +@interface GAMBannerViewOptions : GADAdLoaderOptions + +/// Whether the publisher will record impressions manually when the ad becomes visible to the user. +@property(nonatomic, assign) BOOL enableManualImpressions; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h new file mode 100644 index 000000000..139ccc65a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h @@ -0,0 +1,37 @@ +// +// GAMInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import +#import + +@class GAMInterstitialAd; +typedef void (^GAMInterstitialAdLoadCompletionHandler)(GAMInterstitialAd *_Nullable interstitialAd, + NSError *_Nullable error); + +/// Google Ad Manager interstitial ad, a full-screen advertisement shown at natural +/// transition points in your application such as between game levels or news stories. +@interface GAMInterstitialAd : GADInterstitialAd + +/// Optional delegate that is notified when creatives send app events. +@property(nonatomic, weak, nullable) id appEventDelegate; + +/// Loads an interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdManagerAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GAMRequest *)request + completionHandler:(nonnull GAMInterstitialAdLoadCompletionHandler)completionHandler; + ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADInterstitialAdLoadCompletionHandler)completionHandler + NS_UNAVAILABLE; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMRequest.h similarity index 66% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPRequest.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMRequest.h index d12cb353d..56b798b12 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/DFPRequest.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GAMRequest.h @@ -1,5 +1,5 @@ // -// DFPRequest.h +// GAMRequest.h // Google Mobile Ads SDK // // Copyright 2014 Google LLC. All rights reserved. @@ -9,18 +9,18 @@ #import /// Add this constant to the testDevices property's array to receive test ads on the simulator. -GAD_EXTERN const id _Nonnull kDFPSimulatorID; +GAD_EXTERN const id _Nonnull kGAMSimulatorID; /// Specifies optional parameters for ad requests. -@interface DFPRequest : GADRequest +@interface GAMRequest : GADRequest /// Publisher provided user ID. @property(nonatomic, copy, nullable) NSString *publisherProvidedID; /// Array of strings used to exclude specified categories in ad results. -@property(nonatomic, copy, nullable) NSArray *categoryExclusions; +@property(nonatomic, copy, nullable) NSArray *categoryExclusions; /// Key-value pairs used for custom targeting. -@property(nonatomic, copy, nullable) NSDictionary *customTargeting; +@property(nonatomic, copy, nullable) NSDictionary *customTargeting; @end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAds.h similarity index 79% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAds.h index 3c7cbce71..bdd252c44 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAds.h @@ -11,10 +11,6 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; // Header files. -#import -#import -#import -#import #import #import #import @@ -41,57 +37,50 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import #import +#import +#import #import #import #import #import #import #import -#import -#import #import -#import -#import -#import -#import +#import #import #import #import #import #import #import +#import +#import #import +#import #import #import #import #import #import +#import #import -#import -#import -#import #import #import #import #import #import #import -#import -#import #import -#import -#import +#import #import #import -#import -#import -#import -#import -#import -#import #import #import #import +#import +#import +#import +#import #import #import #import @@ -109,6 +98,8 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import #import +#import +#import #import #import #import diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h similarity index 91% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h index c7b533f54..39184813a 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h @@ -6,8 +6,8 @@ // #import +#import #import -#import /// Provides methods used for constructing native ads. The adapter must return an object conforming /// to this protocol for native ad requests. @@ -69,9 +69,9 @@ /// nonclickable asset views. viewController should be used to present modal views for the ad. - (void)didRenderInView:(nonnull UIView *)view clickableAssetViews: - (nonnull NSDictionary *)clickableAssetViews + (nonnull NSDictionary *)clickableAssetViews nonclickableAssetViews: - (nonnull NSDictionary *)nonclickableAssetViews + (nonnull NSDictionary *)nonclickableAssetViews viewController:(nonnull UIViewController *)viewController; /// Tells the receiver that an impression is recorded. This method is called only once per mediated @@ -81,7 +81,7 @@ /// 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:(nonnull GADUnifiedNativeAssetIdentifier)assetName +- (void)didRecordClickOnAssetWithName:(nonnull GADNativeAssetIdentifier)assetName view:(nonnull UIView *)view viewController:(nonnull UIViewController *)viewController; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h similarity index 84% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h index 197e64b2a..d91357874 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h @@ -20,6 +20,13 @@ typedef id _Nullable (^GADMediationBannerLoadCompletionHandler)( _Nullable id ad, NSError *_Nullable error); +/// Called by the adapter after loading the interscroller ad or encountering an error. Returns an ad +/// event object to send ad events to the Google Mobile Ads SDK. The block returns nil if a delegate +/// couldn't be created or if the block has already been called. +typedef id _Nullable ( + ^GADMediationInterscrollerAdLoadCompletionHandler)(_Nullable id ad, + NSError *_Nullable error); + /// Called by the adapter after loading the interstitial ad or encountering an error. Returns an /// ad event delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if a /// delegate couldn't be created or if the block has already been called. @@ -52,7 +59,7 @@ typedef void (^GADMediationAdapterSetUpCompletionBlock)(NSError *_Nullable error /// load time. @protocol GADMediationAdapter /// Returns the adapter version. -+ (GADVersionNumber)version; ++ (GADVersionNumber)adapterVersion; /// Returns the ad SDK version. + (GADVersionNumber)adSDKVersion; @@ -61,7 +68,7 @@ typedef void (^GADMediationAdapterSetUpCompletionBlock)(NSError *_Nullable error /// Returns Nil if the network doesn't have publisher provided extras. + (nullable Class)networkExtrasClass; -/// Returns an initalized mediation adapter. +/// Returns an initialized mediation adapter. - (nonnull instancetype)init; @optional @@ -79,6 +86,16 @@ typedef void (^GADMediationAdapterSetUpCompletionBlock)(NSError *_Nullable error completionHandler: (nonnull GADMediationBannerLoadCompletionHandler)completionHandler; +/// Asks the adapter to load an interscroller ad with the provided ad configuration. The adapter +/// must call back completionHandler with the loaded ad, or it may call back with an error. This +/// method is called on the main thread, and completionHandler must be called back on the main +/// thread. +- (void)loadInterscrollerAdForAdConfiguration: + (nonnull GADMediationBannerAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationInterscrollerAdLoadCompletionHandler) + completionHandler; + /// Asks the adapter to load an interstitial ad with the provided ad configuration. The adapter /// must call back completionHandler with the loaded ad, or it may call back with an error. This /// method is called on the main thread, and completionHandler must be called back on the main diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h similarity index 77% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h index 31630fff1..57b73f185 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h @@ -23,6 +23,15 @@ - (void)changeAdSizeTo:(GADAdSize)adSize; @end +/// Rendered interscroller ad. +@protocol GADMediationInterscrollerAd + +/// Indicates whether the interscroller rendering effect should be delegated to the Google Mobile +/// Ads SDK. +@property(nonatomic, assign) BOOL delegateInterscrollerEffect; + +@end + /// Banner ad configuration. @interface GADMediationBannerAdConfiguration : GADMediationAdConfiguration diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h new file mode 100644 index 000000000..dc82714d4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h @@ -0,0 +1,35 @@ +// +// GADMediationNativeAdAssetIdentifiers.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +typedef NSString *GADUnifiedNativeAssetIdentifier NS_STRING_ENUM + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); + +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeHeadlineAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeCallToActionAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeIconAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeBodyAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStoreAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativePriceAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeImageAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStarRatingAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdvertiserAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeMediaViewAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdChoicesViewAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequestError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h similarity index 90% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequestError.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h index 3a162042f..053a6c529 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/GADRequestError.h +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h @@ -1,8 +1,8 @@ // -// GADRequestError.h +// GADMediationRequestError.h // Google Mobile Ads SDK // -// Copyright 2011 Google LLC. All rights reserved. +// Copyright 2020 Google LLC. All rights reserved. // #import @@ -12,7 +12,7 @@ GAD_EXTERN NSString *_Nonnull const kGADErrorDomain; /// NSError codes for GAD error domain. -typedef NS_ENUM(NSInteger, GADErrorCode) { +typedef NS_ENUM(NSInteger, GADMediationErrorCode) { /// The ad request is invalid. The localizedFailureReason error description will have more /// details. Typically this is because the ad did not have the ad unit ID or root view /// controller set. @@ -66,8 +66,4 @@ typedef NS_ENUM(NSInteger, GADErrorCode) { /// Will not send request because the application identifier is missing. kGADErrorApplicationIdentifierMissing = 20, -}; - -/// Represents the error generated due to invalid request parameters. -@interface GADRequestError : NSError -@end +} GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADErrorCode."); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h similarity index 100% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Modules/module.modulemap similarity index 81% rename from tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Modules/module.modulemap rename to tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Modules/module.modulemap index 399e89889..2e2060cb7 100644 --- a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.framework/Modules/module.modulemap +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Modules/module.modulemap @@ -28,10 +28,6 @@ framework module GoogleMobileAds { link framework "UIKit" link framework "WebKit" - header "DFPBannerView.h" - header "DFPBannerViewOptions.h" - header "DFPInterstitial.h" - header "DFPRequest.h" header "GADAdChoicesView.h" header "GADAdFormat.h" header "GADAdLoader.h" @@ -58,57 +54,50 @@ framework module GoogleMobileAds { header "GADCustomEventNativeAdDelegate.h" header "GADCustomEventParameters.h" header "GADCustomEventRequest.h" + header "GADCustomNativeAd.h" + header "GADCustomNativeAdDelegate.h" header "GADDebugOptionsViewController.h" header "GADDelayedAdRenderingOptions.h" header "GADDisplayAdMeasurement.h" header "GADDynamicHeightSearchRequest.h" header "GADExtras.h" header "GADFullScreenContentDelegate.h" - header "GADInAppPurchase.h" - header "GADInAppPurchaseDelegate.h" header "GADInitializationStatus.h" - header "GADInstreamAd.h" - header "GADInstreamAdView.h" - header "GADInterstitial.h" - header "GADInterstitialDelegate.h" + header "GADInterstitialAd.h" header "GADMediaAspectRatio.h" header "GADMediaContent.h" header "GADMediaView.h" header "GADMobileAds.h" header "GADMultipleAdsAdLoaderOptions.h" header "GADMuteThisAdReason.h" + header "GADNativeAd+ConfirmationClick.h" + header "GADNativeAd+CustomClickGesture.h" header "GADNativeAd.h" + header "GADNativeAdAssetIdentifiers.h" header "GADNativeAdDelegate.h" header "GADNativeAdImage+Mediation.h" header "GADNativeAdImage.h" header "GADNativeAdImageAdLoaderOptions.h" header "GADNativeAdMediaAdLoaderOptions.h" + header "GADNativeAdUnconfirmedClickDelegate.h" header "GADNativeAdViewAdOptions.h" - header "GADNativeCustomTemplateAd.h" - header "GADNativeExpressAdView.h" - header "GADNativeExpressAdViewDelegate.h" header "GADNativeMuteThisAdLoaderOptions.h" header "GADPresentationError.h" header "GADRequest.h" header "GADRequestConfiguration.h" header "GADRequestError.h" header "GADResponseInfo.h" - header "GADRewardBasedVideoAd.h" - header "GADRewardBasedVideoAdDelegate.h" header "GADRewardedAd.h" - header "GADRewardedAdDelegate.h" - header "GADRewardedAdMetadataDelegate.h" + header "GADRewardedInterstitialAd.h" header "GADSearchBannerView.h" header "GADServerSideVerificationOptions.h" - header "GADUnifiedNativeAd+ConfirmationClick.h" - header "GADUnifiedNativeAd+CustomClickGesture.h" - header "GADUnifiedNativeAd.h" - header "GADUnifiedNativeAdAssetIdentifiers.h" - header "GADUnifiedNativeAdDelegate.h" - header "GADUnifiedNativeAdUnconfirmedClickDelegate.h" header "GADVideoController.h" header "GADVideoControllerDelegate.h" header "GADVideoOptions.h" + header "GAMBannerView.h" + header "GAMBannerViewOptions.h" + header "GAMInterstitialAd.h" + header "GAMRequest.h" header "GoogleMobileAdsDefines.h" header "Mediation/GADMAdNetworkAdapterProtocol.h" header "Mediation/GADMAdNetworkConnectorProtocol.h" @@ -126,6 +115,8 @@ framework module GoogleMobileAds { header "Mediation/GADMediationBannerAd.h" header "Mediation/GADMediationInterstitialAd.h" header "Mediation/GADMediationNativeAd.h" + header "Mediation/GADMediationNativeAdAssetIdentifiers.h" + header "Mediation/GADMediationRequestError.h" header "Mediation/GADMediationRewardedAd.h" header "Mediation/GADMediationServerConfiguration.h" header "Mediation/GADVersionNumber.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/GoogleMobileAds b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/GoogleMobileAds new file mode 100644 index 000000000..9fff7673a Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/GoogleMobileAds differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdChoicesView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdChoicesView.h new file mode 100644 index 000000000..6bc2d93ef --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdChoicesView.h @@ -0,0 +1,16 @@ +// +// GADAdChoicesView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Displays AdChoices content. +/// +/// If a GADAdChoicesView is set on GADNativeAdView prior to calling -setNativeAd:, AdChoices +/// content will render inside the GADAdChoicesView. By default, AdChoices is placed in the top +/// right corner of GADNativeAdView. +@interface GADAdChoicesView : UIView +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdFormat.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdFormat.h new file mode 100644 index 000000000..7c214ca99 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdFormat.h @@ -0,0 +1,17 @@ +// +// GADAdFormat.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Requested ad format. +typedef NS_ENUM(NSInteger, GADAdFormat) { + GADAdFormatBanner, ///< Banner. + GADAdFormatInterstitial, ///< Interstitial. + GADAdFormatRewarded, ///< Rewarded. + GADAdFormatNative, ///< Native. + GADAdFormatRewardedInterstitial, ///< Rewarded interstitial. +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoader.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoader.h new file mode 100644 index 000000000..aaadacd65 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoader.h @@ -0,0 +1,46 @@ +// +// GADAdLoader.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import + +/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions +/// subclasses. +@interface GADAdLoaderOptions : NSObject +@end + +/// Loads ads. See GADAdLoaderAdTypes.h for available ad types. +@interface GADAdLoader : NSObject + +/// Object notified when an ad request succeeds or fails. Must conform to requested ad types' +/// delegate protocols. +@property(nonatomic, weak, nullable) id delegate; + +/// The ad loader's ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Indicates whether the ad loader is loading. +@property(nonatomic, getter=isLoading, readonly) BOOL loading; + +/// Returns an initialized ad loader configured to load the specified ad types. +/// +/// @param rootViewController The root view controller is used to present ad click actions. +/// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types. +/// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil +/// to use default options. See each ad type's header for available GADAdLoaderOptions subclasses. +- (nonnull instancetype)initWithAdUnitID:(nonnull NSString *)adUnitID + rootViewController:(nullable UIViewController *)rootViewController + adTypes:(nonnull NSArray *)adTypes + options:(nullable NSArray *)options; + +/// Loads the ad and informs the delegate of the outcome. +- (void)loadRequest:(nullable GADRequest *)request; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h new file mode 100644 index 000000000..e317b132e --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h @@ -0,0 +1,23 @@ +// +// GADAdLoaderAdTypes.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import + +typedef NSString *GADAdLoaderAdType NS_STRING_ENUM; + +/// Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader's +/// delegate must conform to the GADCustomNativeAdLoaderDelegate protocol. See GADCustomNativeAd.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeCustomNative; + +/// Use with GADAdLoader to request Google Ad Manager banner ads. To receive ads, the ad loader's +/// delegate must conform to the GAMBannerAdLoaderDelegate protocol. See GAMBannerView.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeGAMBanner; + +/// Use with GADAdLoader to request native ads. To receive ads, the ad loader's delegate must +/// conform to the GADNativeAdLoaderDelegate protocol. See GADNativeAd.h. +GAD_EXTERN GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeNative; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h new file mode 100644 index 000000000..559b337de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h @@ -0,0 +1,25 @@ +// +// GADAdLoaderDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +@class GADAdLoader; + +/// Base ad loader delegate protocol. Ad types provide extended protocols that declare methods to +/// handle successful ad loads. +@protocol GADAdLoaderDelegate + +/// Called when adLoader fails to load an ad. +- (void)adLoader:(nonnull GADAdLoader *)adLoader + didFailToReceiveAdWithError:(nonnull NSError *)error; + +@optional + +/// Called after adLoader has finished loading. +- (void)adLoaderDidFinishLoading:(nonnull GADAdLoader *)adLoader; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdMetadata.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdMetadata.h new file mode 100644 index 000000000..167fde460 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdMetadata.h @@ -0,0 +1,33 @@ +// +// GADAdMetadata.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import + +/// Ad metadata key type. +typedef NSString *GADAdMetadataKey NS_STRING_ENUM; + +@protocol GADAdMetadataDelegate; + +/// Protocol for ads that provide ad metadata. +@protocol GADAdMetadataProvider + +/// The ad's metadata. Use adMetadataDelegate to receive ad metadata change messages. +@property(nonatomic, readonly, nullable) NSDictionary *adMetadata; + +/// Delegate for receiving ad metadata changes. +@property(nonatomic, weak, nullable) id adMetadataDelegate; + +@end + +/// Delegate protocol for receiving ad metadata change messages from a GADAdMetadataProvider. +@protocol GADAdMetadataDelegate + +/// Tells the delegate that the ad's metadata changed. Called when an ad loads and when a loaded +/// ad's metadata changes. +- (void)adMetadataDidChange:(nonnull id)ad; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h new file mode 100644 index 000000000..d9e2b7878 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h @@ -0,0 +1,16 @@ +// +// GADAdNetworkExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import + +/// An object implementing this protocol contains information set by the publisher on the client +/// device for a particular ad network. +/// +/// Ad networks should create an 'extras' object implementing this protocol for their publishers to +/// use. +@protocol GADAdNetworkExtras +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdReward.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdReward.h new file mode 100644 index 000000000..85654659e --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdReward.h @@ -0,0 +1,27 @@ +// +// GADAdReward.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +/// A block to be executed when the user earns a reward. +typedef void (^GADUserDidEarnRewardHandler)(void); + +/// Ad reward information. +@interface GADAdReward : NSObject + +/// Type of the reward. +@property(nonatomic, readonly, nonnull) NSString *type; + +/// Amount rewarded to the user. +@property(nonatomic, readonly, nonnull) NSDecimalNumber *amount; + +/// Returns an initialized GADAdReward with the provided reward type and reward amount. +- (nonnull instancetype)initWithRewardType:(nonnull NSString *)rewardType + rewardAmount:(nonnull NSDecimalNumber *)rewardAmount + NS_DESIGNATED_INITIALIZER; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSize.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSize.h new file mode 100644 index 000000000..d0d4aaa64 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSize.h @@ -0,0 +1,131 @@ +// +// GADAdSize.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSize +/// constructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight, +/// GADAdSizeFullWidthLandscapeWithHeight. +/// +/// Do not create a GADAdSize manually. Use one of the kGADAdSize constants. Treat GADAdSize as an +/// opaque type. Do not access any fields directly. To obtain a concrete CGSize, use the function +/// CGSizeFromGADAdSize(). +typedef struct GAD_BOXABLE GADAdSize GADAdSize; + +/// Ad size. +/// +/// @see typedef GADAdSize +struct GAD_BOXABLE GADAdSize { + /// The ad size. Don't modify this value directly. + CGSize size; + /// Reserved. + NSUInteger flags; +}; + +#pragma mark Standard Sizes + +/// iPhone and iPod Touch ad size. Typically 320x50. +GAD_EXTERN GADAdSize const kGADAdSizeBanner; + +/// Taller version of kGADAdSizeBanner. Typically 320x100. +GAD_EXTERN GADAdSize const kGADAdSizeLargeBanner; + +/// Medium Rectangle size for the iPad (especially in a UISplitView's left pane). Typically 300x250. +GAD_EXTERN GADAdSize const kGADAdSizeMediumRectangle; + +/// Full Banner size for the iPad (especially in a UIPopoverController or in +/// UIModalPresentationFormSheet). Typically 468x60. +GAD_EXTERN GADAdSize const kGADAdSizeFullBanner; + +/// Leaderboard size for the iPad. Typically 728x90. +GAD_EXTERN GADAdSize const kGADAdSizeLeaderboard; + +/// Skyscraper size for the iPad. Mediation only. AdMob/Google does not offer this size. Typically +/// 120x600. +GAD_EXTERN GADAdSize const kGADAdSizeSkyscraper; + +/// An ad size that spans the full width of its container, with a height dynamically determined by +/// the ad. +GAD_EXTERN GADAdSize const kGADAdSizeFluid; + +/// Invalid ad size marker. +GAD_EXTERN GADAdSize const kGADAdSizeInvalid; + +#pragma mark Adaptive Sizes + +/// Returns a GADAdSize with the given width and a Google-optimized height to create a banner ad. +/// The size returned has an aspect ratio similar to that of kGADAdSizeBanner, suitable for +/// anchoring near the top or bottom of your app. The height is never larger than 15% of the +/// device's portrait height and is always between 50-90 points. This function always returns the +/// same height for any width / device combination. +GAD_EXTERN GADAdSize GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth(CGFloat width); + +/// Returns a GADAdSize with the given width and a Google-optimized height to create a banner ad. +/// The size returned is suitable for use in a banner ad anchored near the top or bottom of your +/// app, similar to use of kGADAdSizeBanner. The height is never larger than 15% of the devices's +/// landscape height and is always between 50-90 points. This function always returns the same +/// height for any width / device combination. +GAD_EXTERN GADAdSize GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(CGFloat width); + +/// Returns a GADAdSize with the given width and a Google-optimized height. This is a convenience +/// function to return GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth or +/// GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth based on the current interface orientation. +/// This function must be called on the main queue. +GAD_EXTERN GADAdSize GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(CGFloat width); + +#pragma mark Custom Sizes + +/// Returns a custom GADAdSize for the provided CGSize. Use this only if you require a non-standard +/// size. Otherwise, use one of the standard size constants above. +GAD_EXTERN GADAdSize GADAdSizeFromCGSize(CGSize size); + +/// Returns a custom GADAdSize that spans the full width of the application in portrait orientation +/// with the height provided. +GAD_EXTERN GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height); + +/// Returns a custom GADAdSize that spans the full width of the application in landscape orientation +/// with the height provided. +GAD_EXTERN GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); + +#pragma mark Convenience Functions + +/// Returns YES if the two GADAdSizes are equal, otherwise returns NO. +GAD_EXTERN BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); + +/// Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returns +/// CGSizeZero. +GAD_EXTERN CGSize CGSizeFromGADAdSize(GADAdSize size); + +/// Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated by +/// GADAdSizeFromCGSize. +GAD_EXTERN BOOL IsGADAdSizeValid(GADAdSize size); + +/// Returns YES if |size| is a fluid ad size. +GAD_EXTERN BOOL GADAdSizeIsFluid(GADAdSize size); + +/// Returns a NSString describing the provided GADAdSize. +GAD_EXTERN NSString *_Nonnull NSStringFromGADAdSize(GADAdSize size); + +/// Returns an NSValue representing the GADAdSize. +GAD_EXTERN NSValue *_Nonnull NSValueFromGADAdSize(GADAdSize size); + +/// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize. +GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *_Nonnull value); + +#pragma mark Deprecated + +/// An ad size that spans the full width of the application in portrait orientation. The height is +/// typically 50 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth."); + +/// An ad size that spans the full width of the application in landscape orientation. The height is +/// typically 32 points on an iPhone/iPod UI, and 90 points tall on an iPad UI. +GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth"); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h new file mode 100644 index 000000000..43a62fd46 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h @@ -0,0 +1,20 @@ +// +// GADAdSizeDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +@class GADBannerView; + +/// The class implementing this protocol will be notified when the GADBannerView's ad content +/// changes size. Any views that may be affected by the banner size change will have time to adjust. +@protocol GADAdSizeDelegate + +/// Called before the ad view changes to the new size. +- (void)adView:(nonnull GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdValue.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdValue.h new file mode 100644 index 000000000..e823547b1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAdValue.h @@ -0,0 +1,38 @@ +// +// GADAdValue.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import + +typedef NS_ENUM(NSInteger, GADAdValuePrecision) { + /// An ad value with unknown precision. + GADAdValuePrecisionUnknown = 0, + /// An ad value estimated from aggregated data. + GADAdValuePrecisionEstimated = 1, + /// A publisher-provided ad value, such as manual CPMs in a mediation group. + GADAdValuePrecisionPublisherProvided = 2, + /// The precise value paid for this ad. + GADAdValuePrecisionPrecise = 3 +}; + +@class GADAdValue; + +/// Handles ad events that are estimated to have earned money. +typedef void (^GADPaidEventHandler)(GADAdValue *_Nonnull value); + +/// The monetary value earned from an ad. +@interface GADAdValue : NSObject + +/// The precision of the reported ad value. +@property(nonatomic, readonly) GADAdValuePrecision precision; + +/// The ad's value. +@property(nonatomic, nonnull, readonly) NSDecimalNumber *value; + +/// The value's currency code. +@property(nonatomic, nonnull, readonly) NSString *currencyCode; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h new file mode 100644 index 000000000..119eebe24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h @@ -0,0 +1,29 @@ +// +// GADAppEventDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import + +@class GADBannerView; +@class GADInterstitialAd; + +/// Implement your app event within these methods. The delegate will be notified when the SDK +/// receives an app event message from the ad. +@protocol GADAppEventDelegate + +@optional + +/// Called when the banner receives an app event. +- (void)adView:(nonnull GADBannerView *)banner + didReceiveAppEvent:(nonnull NSString *)name + withInfo:(nullable NSString *)info; + +/// Called when the interstitial receives an app event. +- (void)interstitialAd:(nonnull GADInterstitialAd *)interstitialAd + didReceiveAppEvent:(nonnull NSString *)name + withInfo:(nullable NSString *)info; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppOpenAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppOpenAd.h new file mode 100644 index 000000000..28e2c78c2 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAppOpenAd.h @@ -0,0 +1,59 @@ +// +// GADAppOpenAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import + +#pragma mark - App Open Ad + +@class GADAppOpenAd; + +/// The handler block to execute when the ad load operation completes. On failure, the +/// appOpenAd is nil and the |error| is non-nil. On success, the appOpenAd is non-nil and the +/// |error| is nil. +typedef void (^GADAppOpenAdLoadCompletionHandler)(GADAppOpenAd *_Nullable appOpenAd, + NSError *_Nullable error); + +/// An app open ad. Used to monetize app load screens. +@interface GADAppOpenAd : NSObject + +/// Loads an app open ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param orientation The interface orientation that the ad will be presented in. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + orientation:(UIInterfaceOrientation)orientation + completionHandler:(nonnull GADAppOpenAdLoadCompletionHandler)completionHandler; + +/// Optional delegate object that receives notifications about presentation and dismissal of full +/// screen content from this ad. Full screen content covers your application's content. The delegate +/// may want to pause animations and time sensitive interactions. Set this delegate before +/// presenting the ad. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Returns whether the app open ad can be presented from the provided root view controller. Sets +/// the error out parameter if the app open ad can't be presented. Must be called on the main +/// thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the app open ad with the provided view controller. Must be called on the main thread. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h new file mode 100644 index 000000000..7814bef89 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h @@ -0,0 +1,29 @@ +// +// GADAudioVideoManager.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import +#import + +/// Provides audio and video notifications and configurations management. +/// +/// Don't create an instance of this class and use the one available from GADMobileAds +/// sharedInstance's audioVideoManager. +@interface GADAudioVideoManager : NSObject + +/// Delegate for receiving video and audio updates. +@property(nonatomic, weak, nullable) id delegate; + +/// Indicates whether the application wishes to manage audio session. If set as YES, the Google +/// Mobile Ads SDK will stop managing AVAudioSession during the video playback lifecycle. If set as +/// NO, the Google Mobile Ads SDK will control AVAudioSession. That may include: setting +/// AVAudioSession's category to AVAudioSessionCategoryAmbient when all videos are muted, setting +/// AVAudioSession's category to AVAudioSessionCategorySoloAmbient when any playing video becomes +/// unmuted, and allowing background apps to continue playing sound when all videos rendered by +/// Google Mobile Ads SDK are muted or have stopped playing. Must be accessed on main thread only. +@property(nonatomic, assign) BOOL audioSessionIsApplicationManaged; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h new file mode 100644 index 000000000..04d538a7f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h @@ -0,0 +1,36 @@ +// +// GADAudioVideoManagerDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +@class GADAudioVideoManager; + +/// A set of methods to inform the delegate of audio video manager events. +@protocol GADAudioVideoManagerDelegate + +@optional + +/// Tells the delegate that the Google Mobile Ads SDK will start playing a video. This method isn't +/// called if another video rendered by Google Mobile Ads SDK is already playing. +- (void)audioVideoManagerWillPlayVideo:(nonnull GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that the Google Mobile Ads SDK has paused/stopped all video playback. +- (void)audioVideoManagerDidPauseAllVideo:(nonnull GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that at least one video rendered by the Google Mobile Ads SDK will play +/// sound. Your app should stop playing sound when this method is called. +- (void)audioVideoManagerWillPlayAudio:(nonnull GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that all the video rendered by the Google Mobile Ads SDK has stopped playing +/// sound. Your app can now resume any music playback or produce any kind of sound. Note that this +/// message doesn't mean that all the video has stopped playing, just audio, so you shouldn't +/// deactivate AVAudioSession's instance. Doing so can lead to unexpected video playback behavior. +/// You may deactivate AVAudioSession only when all rendered video ads are paused or have finished +/// playing, and 'audioVideoDidPauseAllVideo:' is called. +- (void)audioVideoManagerDidStopPlayingAudio:(nonnull GADAudioVideoManager *)audioVideoManager; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerView.h new file mode 100644 index 000000000..284e29429 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerView.h @@ -0,0 +1,76 @@ +// +// GADBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +/// A view that displays banner ads. See https://developers.google.com/admob/ios/banner to get +/// started. +@interface GADBannerView : UIView + +#pragma mark Initialization + +/// Initializes and returns a banner view with the specified ad size and origin relative to the +/// banner's superview. +- (nonnull instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; + +/// Initializes and returns a banner view with the specified ad size placed at its superview's +/// origin. +- (nonnull instancetype)initWithAdSize:(GADAdSize)adSize; + +#pragma mark Pre-Request + +/// Required value created on the AdMob website. Create a new ad unit for every unique placement of +/// an ad in your application. Set this to the ID assigned for this placement. Ad units are +/// important for targeting and statistics. +/// +/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" +@property(nonatomic, copy, nullable) IBInspectable NSString *adUnitID; + +/// Required reference to a root view controller that is used by the banner to present full screen +/// content after the user interacts with the ad. The root view controller is most commonly the view +/// controller displaying the banner. +@property(nonatomic, weak, nullable) IBOutlet UIViewController *rootViewController; + +/// Required to set this banner view to a proper size. Never create your own GADAdSize directly. +/// Use one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the +/// GADAdSizeFromCGSize method. If not using mediation, then changing the adSize after an ad has +/// been shown will cause a new request (for an ad of the new size) to be sent. If using mediation, +/// then a new request may not be sent. +@property(nonatomic, assign) GADAdSize adSize; + +/// Optional delegate object that receives state change notifications from this GADBannerView. +/// Typically this is a UIViewController. +@property(nonatomic, weak, nullable) IBOutlet id delegate; + +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, nullable) IBOutlet id adSizeDelegate; + +#pragma mark Making an Ad Request + +/// Requests an ad. The request object supplies targeting information. +- (void)loadRequest:(nullable GADRequest *)request; + +/// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If +/// enabled, you do not need to call the loadRequest: method to load ads. +@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled; + +#pragma mark Response + +/// Information about the ad response that returned the current ad or an error. Nil until the first +/// ad request succeeds or fails. +@property(nonatomic, readonly, nullable) GADResponseInfo *responseInfo; + +/// Called when ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h new file mode 100644 index 000000000..090b7b639 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h @@ -0,0 +1,45 @@ +// +// GADBannerViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import + +@class GADBannerView; + +/// Delegate methods for receiving GADBannerView state change messages such as ad request status +/// and ad click lifecycle. +@protocol GADBannerViewDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +/// Tells the delegate that an ad request successfully received an ad. The delegate may want to add +/// the banner view to the view hierarchy if it hasn't been added yet. +- (void)bannerViewDidReceiveAd:(nonnull GADBannerView *)bannerView; + +/// Tells the delegate that an ad request failed. The failure is normally due to network +/// connectivity or ad availablility (i.e., no fill). +- (void)bannerView:(nonnull GADBannerView *)bannerView + didFailToReceiveAdWithError:(nonnull NSError *)error; + +/// Tells the delegate that an impression has been recorded for an ad. +- (void)bannerViewDidRecordImpression:(nonnull GADBannerView *)bannerView; + +#pragma mark Click-Time Lifecycle Notifications + +/// Tells the delegate that a full screen view will be presented in response to the user clicking on +/// an ad. The delegate may want to pause animations and time sensitive interactions. +- (void)bannerViewWillPresentScreen:(nonnull GADBannerView *)bannerView; + +/// Tells the delegate that the full screen view will be dismissed. +- (void)bannerViewWillDismissScreen:(nonnull GADBannerView *)bannerView; + +/// Tells the delegate that the full screen view has been dismissed. The delegate should restart +/// anything paused while handling bannerViewWillPresentScreen:. +- (void)bannerViewDidDismissScreen:(nonnull GADBannerView *)bannerView; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h new file mode 100644 index 000000000..b54c00396 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h @@ -0,0 +1,37 @@ +// +// GADCustomEventBanner.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import +#import +#import + +/// The banner custom event protocol. Your banner custom event handler must implement this protocol. +@protocol GADCustomEventBanner + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak, nullable) id delegate; + +/// Returns an initialized custom event banner. +- (nonnull instancetype)init; + +/// Called by mediation when your custom event is scheduled to be executed. Report execution results +/// to the delegate. +/// +/// @param adSize The size of the ad as configured in the mediation UI for the mediation placement. +/// @param serverParameter Parameter configured in the mediation UI. +/// @param serverLabel Label configured in the mediation UI. +/// @param request Contains ad request information. +- (void)requestBannerAd:(GADAdSize)adSize + parameter:(nullable NSString *)serverParameter + label:(nullable NSString *)serverLabel + request:(nonnull GADCustomEventRequest *)request; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h new file mode 100644 index 000000000..db88e1f03 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h @@ -0,0 +1,65 @@ +// +// GADCustomEventBannerDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +#import + +@protocol GADCustomEventBanner; + +/// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: +/// when there is an ad to show, or customEventBanner:didFailAd: when there is no ad to show. +/// Otherwise, if enough time passed (several seconds) after the SDK called the requestBannerAd: +/// method of your custom event, the mediation SDK will consider the request timed out, and move on +/// to the next ad network. +@protocol GADCustomEventBannerDelegate + +/// Your Custom Event object must call this when it receives or creates an ad view. +- (void)customEventBanner:(nonnull id)customEvent + didReceiveAd:(nonnull UIView *)view; + +/// Your Custom Event object must call this when it fails to receive or create the ad view. Pass +/// along any error object sent from the ad network's SDK, or an NSError describing the error. Pass +/// nil if not available. +- (void)customEventBanner:(nonnull id)customEvent + didFailAd:(nullable NSError *)error; + +/// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate +/// an action. When the SDK receives this callback, it reports the click back to the mediation +/// server. +- (void)customEventBannerWasClicked:(nonnull id)customEvent; + +/// The rootViewController that you set in GADBannerView. Use this UIViewController to show a modal +/// view when a user taps on the ad. +@property(nonatomic, readonly, nonnull) UIViewController *viewControllerForPresentingModalView; + +/// When you call the following methods, the call will be propagated back to the +/// GADBannerViewDelegate that you implemented and passed to GADBannerView. + +/// Your Custom Event should call this when the user taps an ad and a modal view appears. +- (void)customEventBannerWillPresentModal:(nonnull id)customEvent; + +/// Your Custom Event should call this when the user dismisses the modal view and the modal view is +/// about to go away. +- (void)customEventBannerWillDismissModal:(nonnull id)customEvent; + +/// Your Custom Event should call this when the user dismisses the modal view and the modal view has +/// gone away. +- (void)customEventBannerDidDismissModal:(nonnull id)customEvent; + +/// Your Custom Event should call this method when a user action will result in App switching. +- (void)customEventBannerWillLeaveApplication:(nonnull id)customEvent; + +#pragma mark Deprecated + +/// Deprecated. Use customEventBannerWasClicked:. +- (void)customEventBanner:(nonnull id)customEvent + clickDidOccurInAd:(nonnull UIView *)view + GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:."); + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h new file mode 100644 index 000000000..945246740 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h @@ -0,0 +1,29 @@ +// +// GADCustomEventExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +/// Create an instance of this class to set additional parameters for each custom event object. The +/// additional parameters for a custom event are keyed by the custom event label. These extras are +/// passed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial. +@interface GADCustomEventExtras : NSObject + +/// Set additional parameters for the custom event with label |label|. To remove additional +/// parameters associated with |label|, pass in nil for |extras|. +- (void)setExtras:(nullable NSDictionary *)extras forLabel:(nonnull NSString *)label; + +/// Retrieve the extras for |label|. +- (nullable NSDictionary *)extrasForLabel:(nonnull NSString *)label; + +/// Removes all the extras set on this instance. +- (void)removeAllExtras; + +/// Returns all the extras set on this instance. +- (nonnull NSDictionary *)allExtras; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h new file mode 100644 index 000000000..67d3408e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h @@ -0,0 +1,40 @@ +// +// GADCustomEventInterstitial.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// The interstitial custom event protocol. Your interstitial custom event handler must implement +/// this protocol. +@protocol GADCustomEventInterstitial + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak, nullable) id delegate; + +/// Returns an initialized custom event interstitial. +- (nonnull instancetype)init; + +/// Called by mediation when your custom event is scheduled to be executed. Your implementation +/// should start retrieving the interstitial ad. Report execution results to the delegate. You must +/// wait until -presentFromRootViewController is called before displaying the interstitial ad. +/// +/// @param serverParameter Parameter configured in the mediation UI. +/// @param serverLabel Label configured in the mediation UI. +/// @param request Contains ad request information. +- (void)requestInterstitialAdWithParameter:(nullable NSString *)serverParameter + label:(nullable NSString *)serverLabel + request:(nonnull GADCustomEventRequest *)request; + +/// Present the interstitial ad as a modal view using the provided view controller. Called only +/// after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h new file mode 100644 index 000000000..a18f3f533 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h @@ -0,0 +1,58 @@ +// +// GADCustomEventInterstitialDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +@protocol GADCustomEventInterstitial; + +/// Call back to this delegate in your custom event. You must call +/// customEventInterstitialDidReceiveAd: when there is an ad to show, or +/// customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed +/// (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your +/// custom event, the mediation SDK will consider the request timed out, and move on to the next ad +/// network. +@protocol GADCustomEventInterstitialDelegate + +/// Your Custom Event object must call this when it receives or creates an interstitial ad. +- (void)customEventInterstitialDidReceiveAd:(nonnull id)customEvent; + +/// Your Custom Event object must call this when it fails to receive or create the ad. Pass along +/// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if +/// not available. +- (void)customEventInterstitial:(nonnull id)customEvent + didFailAd:(nullable NSError *)error; + +/// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate +/// an action. When the SDK receives this callback, it reports the click back to the mediation +/// server. +- (void)customEventInterstitialWasClicked:(nonnull id)customEvent; + +// When you call any of the following methods, the call will be propagated back to the +// GADInterstitialDelegate that you implemented and passed to GADInterstitial. + +/// Your Custom Event should call this when the interstitial is being displayed. +- (void)customEventInterstitialWillPresent:(nonnull id)customEvent; + +/// Your Custom Event should call this when the interstitial is about to be dismissed. +- (void)customEventInterstitialWillDismiss:(nonnull id)customEvent; + +/// Your Custom Event should call this when the interstitial has been dismissed. +- (void)customEventInterstitialDidDismiss:(nonnull id)customEvent; + +/// Your Custom Event should call this method when a user action will result in app switching. +- (void)customEventInterstitialWillLeaveApplication: + (nonnull id)customEvent; + +#pragma mark Deprecated + +/// Deprecated. Use customEventInterstitialDidReceiveAd:. +- (void)customEventInterstitial:(nonnull id)customEvent + didReceiveAd:(nonnull NSObject *)ad + GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:."); + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h new file mode 100644 index 000000000..5353f0c2a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h @@ -0,0 +1,55 @@ +// +// GADCustomEventNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import + +@protocol GADCustomEventNativeAdDelegate; + +/// Native ad custom event protocol. Your native ad custom event handler class must conform to this +/// protocol. +@protocol GADCustomEventNativeAd + +/// Delegate object used for receiving custom native ad load request progress. +@property(nonatomic, weak, nullable) id delegate; + +/// Returns an initialized custom event native ad. +- (nonnull instancetype)init; + +/// Called when the custom event is scheduled to be executed. +/// +/// @param serverParameter A value configured in the mediation UI for the custom event. +/// @param request Ad targeting information. +/// @param adTypes List of requested native ad types. See GADAdLoaderAdTypes.h for available ad +/// types. +/// @param options Additional options configured by the publisher for requesting a native ad. See +/// GADNativeAdImageAdLoaderOptions.h for available image options. +/// @param rootViewController Publisher-provided view controller. +- (void)requestNativeAdWithParameter:(nonnull NSString *)serverParameter + request:(nonnull GADCustomEventRequest *)request + adTypes:(nonnull NSArray *)adTypes + options:(nonnull NSArray *)options + rootViewController:(nonnull UIViewController *)rootViewController; + +/// Indicates whether the custom event handles user clicks. Return YES if the custom event should +/// handle user clicks. In this case, the Google Mobile Ads SDK doesn't track user clicks and the +/// custom event must notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. Return NO if the +/// custom event doesn't handles user clicks. In this case, the Google Mobile Ads SDK tracks user +/// clicks itself and the custom event is notified of user clicks via -[GADMediatedUnifiedNativeAd +/// didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates whether the custom event handles user impressions tracking. If this method returns +/// YES, the Google Mobile Ads SDK will not track user impressions and the custom event must notify +/// the Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource +/// mediatedNativeAdDidRecordImpression:]. If this method returns NO, the Google Mobile Ads SDK +/// tracks user impressions and notifies the custom event of impressions using +/// -[GADMediatedUnifiedNativeAd didRecordImpression]. +- (BOOL)handlesUserImpressions; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h new file mode 100644 index 000000000..bb67d6685 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h @@ -0,0 +1,26 @@ +// +// GADCustomEventNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// The delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate +/// protocol. Methods in this protocol are used for native ad's custom event communication with the +/// Google Mobile Ads SDK. +@protocol GADCustomEventNativeAdDelegate + +/// Tells the delegate that the custom event ad request failed. +- (void)customEventNativeAd:(nonnull id)customEventNativeAd + didFailToLoadWithError:(nonnull NSError *)error; + +/// Tells the delegate that the custom event ad request succeeded and loaded a unified native ad. +- (void)customEventNativeAd:(nonnull id)customEventNativeAd + didReceiveMediatedUnifiedNativeAd: + (nonnull id)mediatedUnifiedNativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h new file mode 100644 index 000000000..3ad2ad4d0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h @@ -0,0 +1,14 @@ +// +// GADCustomEventParameters.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import +#import + +/// Key for getting the server parameter configured in AdMob when mediating to a custom event +/// adapter. +/// Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer]. +GAD_EXTERN NSString *_Nonnull const GADCustomEventParametersServer; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h new file mode 100644 index 000000000..da7fed1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h @@ -0,0 +1,47 @@ +// +// GADCustomEventRequest.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +@class GADCustomEventExtras; + +/// Specifies optional ad request targeting parameters that are provided by the publisher and are +/// forwarded to custom events for purposes of populating an ad request to a 3rd party ad network. +@interface GADCustomEventRequest : NSObject + +/// 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; + +/// User's latitude set in GADRequest. +@property(nonatomic, readonly, assign) CGFloat userLatitude; + +/// User's longitude set in GADRequest. +@property(nonatomic, readonly, assign) CGFloat userLongitude; + +/// The accuracy, in meters, of the user's location data. +@property(nonatomic, readonly, assign) CGFloat userLocationAccuracyInMeters; + +/// Description of the user's location, in free form text, set in GADRequest. If not available, +/// returns nil. This may be set even if userHasLocation is NO. +@property(nonatomic, readonly, copy, nullable) NSString *userLocationDescription; + +/// Keywords set in GADRequest. Returns nil if no keywords are set. +@property(nonatomic, readonly, copy, nullable) NSArray *userKeywords; + +/// The additional parameters set by the application. This property allows you to pass additional +/// information from your application to your Custom Event object. To do so, create an instance of +/// GADCustomEventExtras to pass to GADRequest -registerAdNetworkExtras:. The instance should have +/// an NSDictionary set for a particular custom event label. That NSDictionary becomes the +/// additionalParameters here. +@property(nonatomic, readonly, copy, nullable) NSDictionary *additionalParameters; + +/// Indicates whether the testing property has been set in GADRequest. +@property(nonatomic, readonly, assign) BOOL isTesting; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h new file mode 100644 index 000000000..0998b39ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h @@ -0,0 +1,96 @@ +// +// GADCustomNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import +#import + +/// Native ad custom click handler block. |assetID| is the ID of asset that has received a click. +typedef void (^GADNativeAdCustomClickHandler)(NSString *_Nonnull assetID); + +/// Asset key for the GADMediaView asset view. +GAD_EXTERN NSString *_Nonnull const GADCustomNativeAdMediaViewKey; + +@protocol GADCustomNativeAdDelegate; + +/// Custom native ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeCustomNative (see GADAdLoaderAdTypes.h) to the |adTypes| parameter +/// in GADAdLoader's initializer method. If you request this ad type, your delegate must conform to +/// the GADCustomNativeAdLoaderDelegate protocol. +@interface GADCustomNativeAd : NSObject + +/// The ad's format ID. +@property(nonatomic, readonly, nonnull) NSString *formatID; + +/// Array of available asset keys. +@property(nonatomic, readonly, nonnull) NSArray *availableAssetKeys; + +/// Returns media view for rendering video loaded by the receiver. Returns nil if receiver doesn't +/// have a video. +@property(nonatomic, readonly, nullable) GADMediaView *mediaView; + +/// Custom click handler. Set this property only if this ad is configured with a custom click +/// action, otherwise set it to nil. If this property is set to a non-nil value, the ad's built-in +/// click actions are ignored and |customClickHandler| is executed when a click on the asset is +/// received. +@property(atomic, copy, nullable) GADNativeAdCustomClickHandler customClickHandler; + +/// The display ad measurement associated with this ad. +@property(nonatomic, readonly, nullable) GADDisplayAdMeasurement *displayAdMeasurement; + +/// Media content. +@property(nonatomic, readonly, nonnull) GADMediaContent *mediaContent; + +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak, nullable) id delegate; + +/// Reference to a root view controller that is used by the ad to present full screen content after +/// the user interacts with the ad. The root view controller is most commonly the view controller +/// displaying the ad. +@property(nonatomic, weak, nullable) UIViewController *rootViewController; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// Returns the native ad image corresponding to the specified key or nil if the image is not +/// available. +- (nullable GADNativeAdImage *)imageForKey:(nonnull NSString *)key; + +/// Returns the string corresponding to the specified key or nil if the string is not available. +- (nullable NSString *)stringForKey:(nonnull NSString *)key; + +/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user +/// interacted with. If this ad is configured with a custom click action, ensure the receiver's +/// customClickHandler property is set before calling this method. +- (void)performClickOnAssetWithKey:(nonnull NSString *)assetKey; + +/// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the +/// first impression is recorded. +- (void)recordImpression; + +@end + +#pragma mark - Loading Protocol + +/// The delegate of a GADAdLoader object implements this protocol to receive +/// GADCustomNativeAd ads. +@protocol GADCustomNativeAdLoaderDelegate + +/// Called when requesting an ad. Asks the delegate for an array of custom native ad format ID +/// strings. +- (nonnull NSArray *)customNativeAdFormatIDsForAdLoader:(nonnull GADAdLoader *)adLoader; + +/// Tells the delegate that a custom native ad was received. +- (void)adLoader:(nonnull GADAdLoader *)adLoader + didReceiveCustomNativeAd:(nonnull GADCustomNativeAd *)customNativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h new file mode 100644 index 000000000..7cbc8d943 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADCustomNativeAdDelegate.h @@ -0,0 +1,43 @@ +// +// GADCustomNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +@class GADCustomNativeAd; + +/// Identifies native ad assets. +@protocol GADCustomNativeAdDelegate + +@optional + +#pragma mark Ad Lifecycle Events + +/// Called when an impression is recorded for a custom native ad. +- (void)customNativeAdDidRecordImpression:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called when a click is recorded for a custom native ad. +- (void)customNativeAdDidRecordClick:(nonnull GADCustomNativeAd *)nativeAd; + +#pragma mark Click-Time Lifecycle Notifications + +/// Called just before presenting the user a full screen view, such as a browser, in response to +/// clicking on an ad. 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 customNativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks +/// on an App Store link, your application will end. The next method called will be the +/// applicationWillResignActive: of your UIApplicationDelegate object. +- (void)customNativeAdWillPresentScreen:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called just before dismissing a full screen view. +- (void)customNativeAdWillDismissScreen:(nonnull GADCustomNativeAd *)nativeAd; + +/// Called just after dismissing a full screen view. Use this opportunity to restart anything you +/// may have stopped as part of customNativeAdWillPresentScreen:. +- (void)customNativeAdDidDismissScreen:(nonnull GADCustomNativeAd *)nativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h new file mode 100644 index 000000000..f692109f8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h @@ -0,0 +1,32 @@ +// +// GADDebugOptionsViewController.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import +#import + +@class GADDebugOptionsViewController; + +/// Delegate for the GADDebugOptionsViewController. +@protocol GADDebugOptionsViewControllerDelegate + +/// Called when the debug options flow is finished. +- (void)debugOptionsViewControllerDidDismiss:(nonnull GADDebugOptionsViewController *)controller; + +@end + +/// Displays debug options to the user. +@interface GADDebugOptionsViewController : UIViewController + +/// Creates and returns a GADDebugOptionsViewController object initialized with the ad unit ID. +/// @param adUnitID An ad unit ID for the Google Ad Manager account that is being configured with +/// debug options. ++ (nonnull instancetype)debugOptionsViewControllerWithAdUnitID:(nonnull NSString *)adUnitID; + +/// Delegate for the debug options view controller. +@property(nonatomic, weak, nullable) IBOutlet id delegate; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h new file mode 100644 index 000000000..17a6ee07c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDelayedAdRenderingOptions.h @@ -0,0 +1,28 @@ +// +// GADDelayedAdRenderingOptions.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import + +/// Delegate for delayed rendering of Google banner ads. +@protocol GADDelayedAdRenderingDelegate + +/// Asks the delegate whether the ad loader should delay rendering the banner ad that it's chosen. +/// If the delegate returns YES, it must also call resumeHandler when it is ready for rendering to +/// resume. +- (BOOL)adLoader:(nonnull GADAdLoader *)adLoader + shouldDelayRenderingWithResumeHandler:(nonnull dispatch_block_t)resumeHandler; + +@end + +/// Ad loader options for configuring delayed rendering of Google banner ads. +@interface GADDelayedAdRenderingOptions : GADAdLoaderOptions + +/// Delegate for delaying the rendering of Google banner ads. +@property(nonatomic, nullable, weak) id delegate; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h new file mode 100644 index 000000000..097ef7fbe --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDisplayAdMeasurement.h @@ -0,0 +1,23 @@ +// +// GADDisplayAdMeasurement.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import +#import + +/// Measurement used for display custom native ad formats. +@interface GADDisplayAdMeasurement : NSObject + +/// Ad view used to measure viewability. This property can be modified before or after starting +/// display ad measurement. Must be accessed on the main thread. +@property(nonatomic, weak, nullable) UIView *view; + +/// Starts OMID viewability measurement for display ads. Returns whether OMID viewability was +/// started and sets |error| if unable to start. Once started, all subsequent calls return YES and +/// have no effect. Must be called on the main thread. +- (BOOL)startWithError:(NSError *_Nullable *_Nullable)error; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h new file mode 100644 index 000000000..b4ec12e2f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h @@ -0,0 +1,163 @@ +// +// GADDynamicHeightSearchRequest.h +// GoogleMobileAds +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Use to configure Custom Search Ad (CSA) ad requests. A dynamic height search banner can contain +/// multiple ads and the height is set dynamically based on the ad contents. Please cross-reference +/// the property sections and properties with the official reference document: +/// https://developers.google.com/custom-search-ads/docs/reference +@interface GADDynamicHeightSearchRequest : GADRequest + +#pragma mark - Page Level Parameters + +#pragma mark Required + +/// The CSA "query" parameter. +@property(nonatomic, copy, nullable) NSString *query; + +/// The CSA "adPage" parameter. +@property(nonatomic, assign) NSInteger adPage; + +#pragma mark Configuration Settings + +/// Indicates whether the CSA "adTest" parameter is enabled. +@property(nonatomic, assign) BOOL adTestEnabled; + +/// The CSA "channel" parameter. +@property(nonatomic, copy, nullable) NSString *channel; + +/// The CSA "hl" parameter. +@property(nonatomic, copy, nullable) NSString *hostLanguage; + +#pragma mark Layout and Styling + +/// The CSA "colorLocation" parameter. +@property(nonatomic, copy, nullable) NSString *locationExtensionTextColor; + +/// The CSA "fontSizeLocation" parameter. +@property(nonatomic, assign) CGFloat locationExtensionFontSize; + +#pragma mark Ad Extensions + +/// Indicates whether the CSA "clickToCall" parameter is enabled. +@property(nonatomic, assign) BOOL clickToCallExtensionEnabled; + +/// Indicates whether the CSA "location" parameter is enabled. +@property(nonatomic, assign) BOOL locationExtensionEnabled; + +/// Indicates whether the CSA "plusOnes" parameter is enabled. +@property(nonatomic, assign) BOOL plusOnesExtensionEnabled; + +/// Indicates whether the CSA "sellerRatings" parameter is enabled. +@property(nonatomic, assign) BOOL sellerRatingsExtensionEnabled; + +/// Indicates whether the CSA "siteLinks" parameter is enabled. +@property(nonatomic, assign) BOOL siteLinksExtensionEnabled; + +#pragma mark - Unit Level Parameters + +#pragma mark Required + +/// The CSA "width" parameter. +@property(nonatomic, copy, nullable) NSString *CSSWidth; + +/// Configuration Settings + +/// The CSA "number" parameter. +@property(nonatomic, assign) NSInteger numberOfAds; + +#pragma mark Font + +/// The CSA "fontFamily" parameter. +@property(nonatomic, copy, nullable) NSString *fontFamily; + +/// The CSA "fontFamilyAttribution" parameter. +@property(nonatomic, copy, nullable) NSString *attributionFontFamily; + +/// The CSA "fontSizeAnnotation" parameter. +@property(nonatomic, assign) CGFloat annotationFontSize; + +/// The CSA "fontSizeAttribution" parameter. +@property(nonatomic, assign) CGFloat attributionFontSize; + +/// The CSA "fontSizeDescription" parameter. +@property(nonatomic, assign) CGFloat descriptionFontSize; + +/// The CSA "fontSizeDomainLink" parameter. +@property(nonatomic, assign) CGFloat domainLinkFontSize; + +/// The CSA "fontSizeTitle" parameter. +@property(nonatomic, assign) CGFloat titleFontSize; + +#pragma mark Color + +/// The CSA "colorAdBorder" parameter. +@property(nonatomic, copy, nullable) NSString *adBorderColor; + +/// The CSA "colorAdSeparator" parameter. +@property(nonatomic, copy, nullable) NSString *adSeparatorColor; + +/// The CSA "colorAnnotation" parameter. +@property(nonatomic, copy, nullable) NSString *annotationTextColor; + +/// The CSA "colorAttribution" parameter. +@property(nonatomic, copy, nullable) NSString *attributionTextColor; + +/// The CSA "colorBackground" parameter. +@property(nonatomic, copy, nullable) NSString *backgroundColor; + +/// The CSA "colorBorder" parameter. +@property(nonatomic, copy, nullable) NSString *borderColor; + +/// The CSA "colorDomainLink" parameter. +@property(nonatomic, copy, nullable) NSString *domainLinkColor; + +/// The CSA "colorText" parameter. +@property(nonatomic, copy, nullable) NSString *textColor; + +/// The CSA "colorTitleLink" parameter. +@property(nonatomic, copy, nullable) NSString *titleLinkColor; + +#pragma mark General Formatting + +/// The CSA "adBorderSelections" parameter. +@property(nonatomic, copy, nullable) NSString *adBorderCSSSelections; + +/// The CSA "adjustableLineHeight" parameter. +@property(nonatomic, assign) CGFloat adjustableLineHeight; + +/// The CSA "attributionSpacingBelow" parameter. +@property(nonatomic, assign) CGFloat attributionBottomSpacing; + +/// The CSA "borderSelections" parameter. +@property(nonatomic, copy, nullable) NSString *borderCSSSelections; + +/// Indicates whether the CSA "noTitleUnderline" parameter is enabled. +@property(nonatomic, assign) BOOL titleUnderlineHidden; + +/// Indicates whether the CSA "titleBold" parameter is enabled. +@property(nonatomic, assign) BOOL boldTitleEnabled; + +/// The CSA "verticalSpacing" parameter. +@property(nonatomic, assign) CGFloat verticalSpacing; + +#pragma mark Ad Extensions + +/// Indicates whether the CSA "detailedAttribution" parameter is enabled. +@property(nonatomic, assign) BOOL detailedAttributionExtensionEnabled; + +/// Indicates whether the CSA "longerHeadlines" parameter is enabled. +@property(nonatomic, assign) BOOL longerHeadlinesExtensionEnabled; + +/// The CSA "styleId" parameter. +@property(nonatomic, copy, nullable) NSString *styleID; + +/// Sets an advanced option value for a specified key. The value must be an NSString or NSNumber. +- (void)setAdvancedOptionValue:(nonnull id)value forKey:(nonnull NSString *)key; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADExtras.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADExtras.h new file mode 100644 index 000000000..724a841d0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADExtras.h @@ -0,0 +1,17 @@ +// +// GADExtras.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import + +/// Ad network extras sent to Google networks. +@interface GADExtras : NSObject + +/// Additional parameters to be sent to Google networks. +@property(nonatomic, copy, nullable) NSDictionary *additionalParameters; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h new file mode 100644 index 000000000..3e6c25373 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADFullScreenContentDelegate.h @@ -0,0 +1,43 @@ +// +// GADFullScreenContentDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import + +@protocol GADFullScreenContentDelegate; + +/// Protocol for ads that present full screen content. +@protocol GADFullScreenPresentingAd + +/// Delegate object that receives full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +@end + +/// Delegate methods for receiving notifications about presentation and dismissal of full screen +/// content. Full screen content covers your application's content. The delegate may want to pause +/// animations or time sensitive interactions. Full screen content may be presented in the following +/// cases: +/// 1. A full screen ad is presented. +/// 2. An ad interaction opens full screen content. +@protocol GADFullScreenContentDelegate + +@optional + +/// Tells the delegate that an impression has been recorded for the ad. +- (void)adDidRecordImpression:(nonnull id)ad; + +/// Tells the delegate that the ad failed to present full screen content. +- (void)ad:(nonnull id)ad + didFailToPresentFullScreenContentWithError:(nonnull NSError *)error; + +/// Tells the delegate that the ad presented full screen content. +- (void)adDidPresentFullScreenContent:(nonnull id)ad; + +/// Tells the delegate that the ad dismissed full screen content. +- (void)adDidDismissFullScreenContent:(nonnull id)ad; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInitializationStatus.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInitializationStatus.h new file mode 100644 index 000000000..a2084433d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInitializationStatus.h @@ -0,0 +1,39 @@ +// +// GADInitializationStatus.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +typedef NS_ENUM(NSInteger, GADAdapterInitializationState) { + /// The mediation adapter is less likely to fill ad requests. + GADAdapterInitializationStateNotReady = 0, + /// The mediation adapter is ready to service ad requests. + GADAdapterInitializationStateReady = 1 +}; + +/// An immutable snapshot of a mediation adapter's initialization status. +@interface GADAdapterStatus : NSObject + +/// Initialization state of the adapter. +@property(nonatomic, readonly) GADAdapterInitializationState state; + +/// Detailed description of the status. +@property(nonatomic, readonly, nonnull) NSString *description; + +/// The adapter's initialization latency in seconds. 0 if initialization has not yet ended. +@property(nonatomic, readonly) NSTimeInterval latency; + +@end + +/// An immutable snapshot of the Google Mobile Ads SDK's initialization status, categorized by +/// mediation adapter. +@interface GADInitializationStatus : NSObject +/// Initialization status of each ad network available to the Google Mobile Ads SDK, keyed by its +/// GADMAdapter's class name. The list of available ad networks may be incomplete during early +/// phases of SDK initialization. +@property(nonatomic, readonly, nonnull) + NSDictionary *adapterStatusesByClassName; +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInterstitialAd.h new file mode 100644 index 000000000..d9f0ff80a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADInterstitialAd.h @@ -0,0 +1,62 @@ +// +// GADInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import + +@class GADInterstitialAd; + +/// A block to be executed when the ad request operation completes. On success, +/// interstitialAd is non-nil and |error| is nil. On failure, interstitialAd is nil +/// and |error| is non-nil. +typedef void (^GADInterstitialAdLoadCompletionHandler)(GADInterstitialAd *_Nullable interstitialAd, + NSError *_Nullable error); + +/// An interstitial ad. This is a full-screen advertisement shown at natural transition points in +/// your application such as between game levels or news stories. See +/// https://developers.google.com/admob/ios/interstitial to get started. +@interface GADInterstitialAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads an interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADInterstitialAdLoadCompletionHandler)completionHandler; + +/// Returns whether the interstitial ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the interstitial ad. Must be called on the main thread. +/// +/// @param rootViewController A view controller to present the ad. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h new file mode 100644 index 000000000..eba2b9bd8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaAspectRatio.h @@ -0,0 +1,22 @@ +// +// GADMediaAspectRatio.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import + +/// Media aspect ratio. +typedef NS_ENUM(NSInteger, GADMediaAspectRatio) { + /// Unknown media aspect ratio. + GADMediaAspectRatioUnknown = 0, + /// Any media aspect ratio. + GADMediaAspectRatioAny = 1, + /// Landscape media aspect ratio. + GADMediaAspectRatioLandscape = 2, + /// Portrait media aspect ratio. + GADMediaAspectRatioPortrait = 3, + /// Close to square media aspect ratio. This is not a strict 1:1 aspect ratio. + GADMediaAspectRatioSquare = 4 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaContent.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaContent.h new file mode 100644 index 000000000..e039e687c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaContent.h @@ -0,0 +1,40 @@ +// +// GADMediaContent.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import +#import + +/// Provides media content information. Interact with instances of this class on the main queue +/// only. +@interface GADMediaContent : NSObject + +/// Controls the media content's video. +@property(nonatomic, readonly, nonnull) GADVideoController *videoController; + +/// Indicates whether the media content has video content. +@property(nonatomic, readonly) BOOL hasVideoContent; + +/// Media content aspect ratio (width/height). The value is 0 when there's no media content or the +/// media content aspect ratio is unknown. +@property(nonatomic, readonly) CGFloat aspectRatio; + +/// The video's duration in seconds or 0 if there's no video or the duration is unknown. +@property(nonatomic, readonly) NSTimeInterval duration; + +/// The video's current playback time in seconds or 0 if there's no video or the current playback +/// time is unknown. +@property(nonatomic, readonly) NSTimeInterval currentTime; + +@end + +@interface GADMediaContent (NativeAd) + +/// The main image to be displayed when the media content doesn't contain video. Only available to +/// native ads. +@property(nonatomic, nullable) UIImage *mainImage; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaView.h new file mode 100644 index 000000000..2a8a6c5ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMediaView.h @@ -0,0 +1,29 @@ +// +// GADMediaView.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import +#import + +/// Displays native ad media content. +/// +/// To display media content in GADNativeAdView instances, add a GADMediaView subview, +/// assign the native ad view's mediaView property, and set the native ad's mediaContent property to +/// the media view. +/// +/// If the native ad contains video content, the media view displays the video content. +/// +/// If the native ad doesn't have video content and image loading is enabled, the media view +/// displays the first image from the native ad's |images| property. +/// +/// If the native ad doesn't have video content and image loading is disabled, the media view is +/// empty. +@interface GADMediaView : UIView + +/// The media content displayed in the media view. +@property(nonatomic, nullable) GADMediaContent *mediaContent; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMobileAds.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMobileAds.h new file mode 100644 index 000000000..b00468644 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMobileAds.h @@ -0,0 +1,96 @@ +// +// GADMobileAds.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import + +/// A block called with the initialization status when [GADMobileAds startWithCompletionHandler:] +/// completes or times out. +typedef void (^GADInitializationCompletionHandler)(GADInitializationStatus *_Nonnull status); + +/// Completion handler for presenting Ad Inspector. Returns an error if a problem was detected +/// during presentation, or nil otherwise. +typedef void (^GADAdInspectorCompletionHandler)(NSError *_Nullable error); + +/// Google Mobile Ads SDK settings. +@interface GADMobileAds : NSObject + +/// Returns the shared GADMobileAds instance. ++ (nonnull GADMobileAds *)sharedInstance; + +/// Returns the version of the SDK. +@property(nonatomic, nonnull, readonly) NSString *sdkVersion; + +/// The application's audio volume. Affects audio volumes of all ads relative to other audio output. +/// Valid ad volume values range from 0.0 (silent) to 1.0 (current device volume). Use this method +/// only if your application has its own volume controls (e.g., custom music or sound effect +/// volumes). Defaults to 1.0. +@property(nonatomic, assign) float applicationVolume; + +/// Indicates whether the application's audio is muted. Affects initial mute state for all ads. Use +/// this method only if your application has its own volume controls (e.g., custom music or sound +/// effect muting). Defaults to NO. +@property(nonatomic, assign) BOOL applicationMuted; + +/// Manages the Google Mobile Ads SDK's audio and video settings. +@property(nonatomic, readonly, strong, nonnull) GADAudioVideoManager *audioVideoManager; + +/// Request configuration that is common to all requests. +@property(nonatomic, readonly, strong, nonnull) GADRequestConfiguration *requestConfiguration; + +/// Initialization status of the ad networks available to the Google Mobile Ads SDK. +@property(nonatomic, nonnull, readonly) GADInitializationStatus *initializationStatus; + +/// Returns YES if the current SDK version is at least |major|.|minor|.|patch|. This method can be +/// used by libraries that depend on a specific minimum version of the Google Mobile Ads SDK to warn +/// developers if they have an incompatible version. +/// +/// Available in Google Mobile Ads SDK 7.10 and onwards. Before calling this method check if the +/// GADMobileAds's shared instance responds to this method. Calling this method on a Google Mobile +/// Ads SDK lower than 7.10 can crash the app. +- (BOOL)isSDKVersionAtLeastMajor:(NSInteger)major minor:(NSInteger)minor patch:(NSInteger)patch; + +/// Starts the Google Mobile Ads SDK. Call this method as early as possible to reduce latency on the +/// session's first ad request. Calls completionHandler when the GMA SDK and all mediation networks +/// are fully set up or if set-up times out. The Google Mobile Ads SDK starts on the first ad +/// request if this method is not called. +- (void)startWithCompletionHandler:(nullable GADInitializationCompletionHandler)completionHandler; + +/// Disables automated SDK crash reporting. If not called, the SDK records the original exception +/// handler if available and registers a new exception handler. The new exception handler only +/// reports SDK related exceptions and calls the recorded original exception handler. +- (void)disableSDKCrashReporting; + +/// Disables mediation adapter initialization during initialization of the GMA SDK. Calling this +/// method may negatively impact your ad performance and should only be called if you will not use +/// GMA SDK controlled mediation during this app session. This method must be called before +/// initializing the GMA SDK or loading ads and has no effect once the SDK has been initialized. +- (void)disableMediationInitialization; + +/// Presents Ad Inspector. The device calling this API must be registered as a test device in order +/// to launch Ad Inspector. Set +/// GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers to enable test mode on +/// this device. +/// @param viewController A view controller to present Ad Inspector. +/// @param completionHandler A handler to execute when Ad Inspector is closed. +- (void)presentAdInspectorFromViewController:(nonnull UIViewController *)viewController + completionHandler: + (nullable GADAdInspectorCompletionHandler)completionHandler; + +#pragma mark Deprecated + +/// Deprecated and does nothing. IAP transaction reporting is no longer supported. +- (void)disableAutomatedInAppPurchaseReporting GAD_DEPRECATED_ATTRIBUTE; + +/// Deprecated and does nothing. IAP transaction reporting is no longer supported. +- (void)enableAutomatedInAppPurchaseReporting GAD_DEPRECATED_ATTRIBUTE; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h new file mode 100644 index 000000000..152a51e3d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h @@ -0,0 +1,23 @@ +// +// GADMultipleAdsAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import + +/// Ad loader options for requesting multiple ads. Requesting multiple ads in a single request is +/// currently only available for native app install ads and native content ads. +@interface GADMultipleAdsAdLoaderOptions : GADAdLoaderOptions + +/// Number of ads the GADAdLoader should attempt to return for the request. By default, numberOfAds +/// is one. Requests are invalid and will fail if numberOfAds is less than one. If numberOfAds +/// exceeds the maximum limit (5), only the maximum number of ads are requested. +/// +/// The ad loader makes at least one and up to numberOfAds calls to the "ad received" and +/// -didFailToReceiveAdWithError: methods found in GADAdLoaderDelegate and its extensions, followed +/// by a single call to -adLoaderDidFinishLoading: once loading is finished. +@property(nonatomic) NSInteger numberOfAds; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h new file mode 100644 index 000000000..6172be510 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADMuteThisAdReason.h @@ -0,0 +1,16 @@ +// +// GADMuteThisAdReason.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Reason for muting the ad. +@interface GADMuteThisAdReason : NSObject + +/// Text that describes the reason for muting this ad. For example "Ad Covered Content". +@property(nonatomic, readonly, nonnull) NSString *reasonDescription; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h new file mode 100644 index 000000000..ad9d4de99 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+ConfirmationClick.h @@ -0,0 +1,28 @@ +// +// GADNativeAd+ConfirmationClick.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import +#import +#import + +@interface GADNativeAd (ConfirmedClick) + +/// 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. Call this method when the user fails to confirm the click. +/// Calling this method causes the SDK to stop tracking clicks on the registered click confirming +/// view and invokes the -nativeAdDidCancelUnconfirmedClick: delegate method. If no unconfirmed +/// click is in progress, this method has no effect. +- (void)cancelUnconfirmedClick; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h new file mode 100644 index 000000000..8d4df3d6c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd+CustomClickGesture.h @@ -0,0 +1,22 @@ +// +// GADNativeAd+CustomClickGesture.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +@interface GADNativeAd (CustomClickGesture) + +/// Indicates whether the custom click gestures feature can be used. +@property(nonatomic, readonly, getter=isCustomClickGestureEnabled) BOOL customClickGestureEnabled; + +/// Enables custom click gestures. Must be called before the ad is associated with an ad view. +/// Available for allowlisted accounts only. +- (void)enableCustomClickGestures; + +/// Records a click triggered by a custom click gesture. +- (void)recordCustomClickGesture; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd.h new file mode 100644 index 000000000..7ba84b953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAd.h @@ -0,0 +1,144 @@ +// +// GADNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +/// Native ad. To request this ad type, pass kGADAdLoaderAdTypeNative +/// (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If +/// you request this ad type, your delegate must conform to the GADNativeAdLoaderDelegate +/// protocol. +@interface GADNativeAd : 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; +/// Media content. Set the associated media view's mediaContent property to this object to display +/// this content. +@property(nonatomic, readonly, nonnull) GADMediaContent *mediaContent; + +#pragma mark - Other properties + +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak, nullable) id delegate; + +/// Reference to a root view controller that is used by the ad to present full screen content after +/// the user interacts with the ad. The root view controller is most commonly the view controller +/// displaying the ad. +@property(nonatomic, weak, nullable) UIViewController *rootViewController; + +/// Dictionary of assets which aren't processed by the receiver. +@property(nonatomic, readonly, copy, nullable) NSDictionary *extraAssets; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Indicates whether custom Mute This Ad is available for the native ad. +@property(nonatomic, readonly, getter=isCustomMuteThisAdAvailable) BOOL customMuteThisAdAvailable; + +/// An array of Mute This Ad reasons used to render customized mute ad survey. Use this array to +/// implement your own Mute This Ad feature only when customMuteThisAdAvailable is YES. +@property(nonatomic, readonly, nullable) NSArray *muteThisAdReasons; + +/// 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:(nonnull UIView *)adView + clickableAssetViews: + (nonnull NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (nonnull NSDictionary *)nonclickableAssetViews; + +/// Unregisters ad view from this native ad. The corresponding asset views will also be +/// unregistered. +- (void)unregisterAdView; + +/// Reports the mute event with the mute reason selected by user. Use nil if no reason was selected. +/// Call this method only if customMuteThisAdAvailable is YES. +- (void)muteThisAdWithReason:(nullable GADMuteThisAdReason *)reason; + +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAd ads. +@protocol GADNativeAdLoaderDelegate +/// Called when a native ad is received. +- (void)adLoader:(nonnull GADAdLoader *)adLoader didReceiveNativeAd:(nonnull GADNativeAd *)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 GADNativeAdView : UIView + +/// This property must point to the native ad object rendered by this ad view. +@property(nonatomic, strong, nullable) GADNativeAd *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 according to the preferredAdChoicesPosition +/// defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, nullable) IBOutlet GADAdChoicesView *adChoicesView; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h new file mode 100644 index 000000000..10e860d20 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdAssetIdentifiers.h @@ -0,0 +1,23 @@ +// +// GADNativeAdAssetIdentifiers.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import + +typedef NSString *GADNativeAssetIdentifier NS_STRING_ENUM; + +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeHeadlineAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeCallToActionAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeIconAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeBodyAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStoreAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativePriceAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeImageAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStarRatingAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdvertiserAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeMediaViewAsset; +GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdChoicesViewAsset; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h new file mode 100644 index 000000000..245aa1acb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h @@ -0,0 +1,51 @@ +// +// GADNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import + +@class GADNativeAd; + +/// Identifies native ad assets. +@protocol GADNativeAdDelegate + +@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:(nonnull GADNativeAd *)nativeAd; + +/// Called when a click is recorded for an ad. Only called for Google ads and is not supported for +/// mediated ads. +- (void)nativeAdDidRecordClick:(nonnull GADNativeAd *)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. +- (void)nativeAdWillPresentScreen:(nonnull GADNativeAd *)nativeAd; + +/// Called before dismissing a full screen view. +- (void)nativeAdWillDismissScreen:(nonnull GADNativeAd *)nativeAd; + +/// Called after dismissing a full screen view. Use this opportunity to restart anything you may +/// have stopped as part of nativeAdWillPresentScreen:. +- (void)nativeAdDidDismissScreen:(nonnull GADNativeAd *)nativeAd; + +#pragma mark - Mute This Ad + +/// Used for Mute This Ad feature. Called after the native ad is muted. Only called for Google ads +/// and is not supported for mediated ads. +- (void)nativeAdIsMuted:(nonnull GADNativeAd *)nativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h new file mode 100644 index 000000000..3e831a474 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h @@ -0,0 +1,19 @@ +// +// GADNativeAdImage+Mediation.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +/// Provides additional GADNativeAdImage initializers. +@interface GADNativeAdImage (MediationAdditions) + +/// Initializes and returns a native ad image object with the provided image. +- (nonnull instancetype)initWithImage:(nonnull UIImage *)image; + +/// Initializes and returns a native ad image object with the provided image URL and image scale. +- (nonnull instancetype)initWithURL:(nonnull NSURL *)URL scale:(CGFloat)scale; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage.h new file mode 100644 index 000000000..06eb77f76 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImage.h @@ -0,0 +1,23 @@ +// +// GADNativeAdImage.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import +#import + +/// Native ad image. +@interface GADNativeAdImage : NSObject + +/// The image. If image autoloading is disabled, this property will be nil. +@property(nonatomic, readonly, strong, nullable) UIImage *image; + +/// The image's URL. +@property(nonatomic, readonly, copy, nullable) NSURL *imageURL; + +/// The image's scale. +@property(nonatomic, readonly, assign) CGFloat scale; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h new file mode 100644 index 000000000..136fab445 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h @@ -0,0 +1,21 @@ +// +// GADNativeAdImageAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +/// Ad loader options for native ad image settings. +@interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions + +/// Indicates whether image asset content should be loaded by the SDK. If set to YES, the SDK will +/// not load image asset content and native ad image URLs can be used to fetch content. Defaults to +/// NO, image assets are loaded by the SDK. +@property(nonatomic, assign) BOOL disableImageLoading; + +/// Indicates whether multiple images should be loaded for each asset. Defaults to NO. +@property(nonatomic, assign) BOOL shouldRequestMultipleImages; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h new file mode 100644 index 000000000..3649a7c09 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdMediaAdLoaderOptions.h @@ -0,0 +1,19 @@ +// +// GADNativeAdMediaAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import +#import + +/// Ad loader options for native ad media settings. +@interface GADNativeAdMediaAdLoaderOptions : GADAdLoaderOptions + +/// Image and video aspect ratios. Defaults to GADMediaAspectRatioUnknown. Portrait, landscape, and +/// square aspect ratios are returned when this property is GADMediaAspectRatioUnknown or +/// GADMediaAspectRatioAny. +@property(nonatomic, assign) GADMediaAspectRatio mediaAspectRatio; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h new file mode 100644 index 000000000..fedabc80a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdUnconfirmedClickDelegate.h @@ -0,0 +1,29 @@ +// +// GADNativeAdUnconfirmedClickDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import + +@class GADNativeAd; + +/// Delegate methods for handling native ad unconfirmed clicks. +@protocol GADNativeAdUnconfirmedClickDelegate + +/// 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 GADNativeAd+ConfirmedClick.h to register +/// a view that will confirm the click. Only called for Google ads and is not supported for mediated +/// ads. +- (void)nativeAd:(nonnull GADNativeAd *)nativeAd + didReceiveUnconfirmedClickOnAssetID:(nonnull GADNativeAssetIdentifier)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:(nonnull GADNativeAd *)nativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h new file mode 100644 index 000000000..8c0c0c621 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h @@ -0,0 +1,24 @@ +// +// GADNativeAdViewAdOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Position of the AdChoices icon in the containing ad. +typedef NS_ENUM(NSInteger, GADAdChoicesPosition) { + GADAdChoicesPositionTopRightCorner, ///< Top right corner. + GADAdChoicesPositionTopLeftCorner, ///< Top left corner. + GADAdChoicesPositionBottomRightCorner, ///< Bottom right corner. + GADAdChoicesPositionBottomLeftCorner ///< Bottom Left Corner. +}; + +/// Ad loader options for configuring the view of native ads. +@interface GADNativeAdViewAdOptions : GADAdLoaderOptions + +/// Indicates preferred location of AdChoices icon. Default is GADAdChoicesPositionTopRightCorner. +@property(nonatomic, assign) GADAdChoicesPosition preferredAdChoicesPosition; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h new file mode 100644 index 000000000..b0f332322 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADNativeMuteThisAdLoaderOptions.h @@ -0,0 +1,16 @@ +// +// GADNativeMuteThisAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Mute This Ad options. +@interface GADNativeMuteThisAdLoaderOptions : GADAdLoaderOptions + +/// Set to YES to request the custom Mute This Ad feature. By default, this property's value is YES. +@property(nonatomic) BOOL customMuteThisAdRequested; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADPresentationError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADPresentationError.h new file mode 100644 index 000000000..a7ae1305a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADPresentationError.h @@ -0,0 +1,32 @@ +// +// GADPresentError.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google LLC. All rights reserved. +// + +#import + +/// Error codes in the Google Mobile Ads SDK domain that surface due to errors when attempting to +/// present an ad. +typedef NS_ENUM(NSInteger, GADPresentationErrorCode) { + + /// Ad isn't ready to be shown. + GADPresentationErrorCodeAdNotReady = 15, + + /// Ad is too large for the scene. + GADPresentationErrorCodeAdTooLarge = 16, + + /// Internal error. + GADPresentationErrorCodeInternal = 17, + + /// Ad has already been used. + GADPresentationErrorCodeAdAlreadyUsed = 18, + + /// Attempted to present ad from a non-main thread. + GADPresentationErrorNotMainThread = 21, + + /// A mediation ad network adapter failed to present the ad. The adapter's error is included as an + /// underlyingError. + GADPresentationErrorMediation = 22, +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequest.h new file mode 100644 index 000000000..aff850443 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequest.h @@ -0,0 +1,84 @@ +// +// GADRequest.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import + +/// Add this constant to the testDevices property's array to receive test ads on the simulator. +GAD_EXTERN const id _Nonnull kGADSimulatorID; + +/// Deprecated gender constants. +typedef NS_ENUM(NSInteger, GADGender) { + kGADGenderUnknown, ///< Deprecated. + kGADGenderMale, ///< Deprecated. + kGADGenderFemale ///< Deprecated. +}; + +/// Specifies optional parameters for ad requests. +@interface GADRequest : NSObject + +/// Returns a default request. ++ (nonnull instancetype)request; + +#pragma mark Additional Parameters For Ad Networks + +/// 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. 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:(nonnull id)extras; + +/// Returns the network extras defined for an ad network. +- (nullable id)adNetworkExtrasFor:(nonnull Class)aClass; + +/// Removes the extras for an ad network. |aClass| is the class which represents that network's +/// extras type. +- (void)removeAdNetworkExtrasFor:(nonnull Class)aClass; + +#pragma mark Publisher Provided + +/// Scene object. Used in multiscene apps to request ads of the appropriate size. +@property(nonatomic, nullable, weak) UIWindowScene *scene API_AVAILABLE(ios(13.0)); + +#pragma mark User Information + +/// The user's current location. Location data is not used to target Google ads; however, it may be +/// used by 3rd party ad networks. Do not use Core Location just for advertising. Your app should +/// have a valid use case for it as well. +- (void)setLocationWithLatitude:(CGFloat)latitude + longitude:(CGFloat)longitude + accuracy:(CGFloat)accuracyInMeters; + +#pragma mark Contextual Information + +/// Array of keyword strings. Keywords are words or phrases describing the current user activity +/// such as @"Sports Scores" or @"Football". Set this property to nil to clear the keywords. +@property(nonatomic, copy, nullable) NSArray *keywords; + +/// URL string for a webpage whose content matches the app's primary content. This webpage content +/// is used for targeting and brand safety purposes. +@property(nonatomic, copy, nullable) NSString *contentURL; + +/// URL strings for non-primary web content near an ad. Promotes brand safety and allows displayed +/// ads to have an app level rating (MA, T, PG, etc) that is more appropriate to neighboring +/// content. +@property(nonatomic, copy, nullable) NSArray *neighboringContentURLStrings; + +#pragma mark Request Agent Information + +/// String that identifies the ad request's origin. Third party libraries that reference the Mobile +/// Ads SDK should set this property to denote the platform from which the ad request originated. +/// For example, a third party ad network called "CoolAds network" that is mediating requests to the +/// Mobile Ads SDK should set this property as "CoolAds". +@property(nonatomic, copy, nullable) NSString *requestAgent; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h new file mode 100644 index 000000000..efe880d2f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestConfiguration.h @@ -0,0 +1,59 @@ +// +// GADRequestConfiguration.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import + +/// Maximum ad content rating. +typedef NSString *GADMaxAdContentRating NS_STRING_ENUM; + +/// Rating for content suitable for general audiences, including families. +GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingGeneral; +/// Rating for content suitable for most audiences with parental guidance. +GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingParentalGuidance; +/// Rating for content suitable for teen and older audiences. +GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingTeen; +/// Rating for content suitable only for mature audiences. +GAD_EXTERN GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingMatureAudience; + +/// Request configuration. The settings in this class will apply to all ad requests. +@interface GADRequestConfiguration : NSObject + +/// The maximum ad content rating. All Google ads will have this content rating or lower. +@property(nonatomic, copy, nullable) GADMaxAdContentRating maxAdContentRating; + +/// Identifiers corresponding to test devices which will always request test ads. +/// The test device identifier for the current device is logged to the console when the first +/// ad request is made. +@property(nonatomic, copy, nullable) NSArray *testDeviceIdentifiers; + +/// This method allows you to specify whether the user is under the age of consent. +/// https://developers.google.com/admob/ios/targeting#users_under_the_age_of_consent. +/// +/// If you call this method with YES, a TFUA parameter will be included in all ad requests. This +/// parameter disables personalized advertising, including remarketing, for all ad requests. It also +/// disables requests to third-party ad vendors, such as ad measurement pixels and third-party ad +/// servers. +- (void)tagForUnderAgeOfConsent:(BOOL)underAgeOfConsent; + +/// [Optional] This method allows you to specify whether you would like your app to be treated as +/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA), +/// http://business.ftc.gov/privacy-and-security/childrens-privacy. +/// +/// If you call this method with YES, you are indicating that your app should be treated as +/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA). If you call +/// this method with NO, you are indicating that your app should not be treated as child-directed +/// for purposes of the Children’s Online Privacy Protection Act (COPPA). If you do not call this +/// method, ad requests will include no indication of how you would like your app treated with +/// respect to COPPA. +/// +/// By setting this method, you certify that this notification is accurate and you are authorized to +/// act on behalf of the owner of the app. You understand that abuse of this setting may result in +/// termination of your Google account. +- (void)tagForChildDirectedTreatment:(BOOL)childDirectedTreatment; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestError.h new file mode 100644 index 000000000..124ed64d0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRequestError.h @@ -0,0 +1,63 @@ +// +// GADRequestError.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import +#import + +/// Google AdMob Ads error domain. +GAD_EXTERN NSString *_Nonnull const GADErrorDomain; + +/// NSError codes for GAD error domain. +typedef NS_ENUM(NSInteger, GADErrorCode) { + /// The ad request is invalid. The localizedFailureReason error description will have more + /// details. Typically this is because the ad did not have the ad unit ID or root view + /// controller set. + GADErrorInvalidRequest = 0, + + /// The ad request was successful, but no ad was returned. + GADErrorNoFill = 1, + + /// There was an error loading data from the network. + GADErrorNetworkError = 2, + + /// The ad server experienced a failure processing the request. + GADErrorServerError = 3, + + /// The current device's OS is below the minimum required version. + GADErrorOSVersionTooLow = 4, + + /// The request was unable to be loaded before being timed out. + GADErrorTimeout = 5, + + /// The mediation response was invalid. + GADErrorMediationDataError = 7, + + /// Error finding or creating a mediation ad network adapter. + GADErrorMediationAdapterError = 8, + + /// Attempting to pass an invalid ad size to an adapter. + GADErrorMediationInvalidAdSize = 10, + + /// Internal error. + GADErrorInternalError = 11, + + /// Invalid argument error. + GADErrorInvalidArgument = 12, + + /// Received invalid response. + GADErrorReceivedInvalidResponse = 13, + + /// A mediation ad network adapter received an ad request, but did not fill. The adapter's error + /// is included as an underlyingError. + GADErrorMediationNoFill = 9, + + /// Will not send request because the ad object has already been used. + GADErrorAdAlreadyUsed = 19, + + /// Will not send request because the application identifier is missing. + GADErrorApplicationIdentifierMissing = 20, +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADResponseInfo.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADResponseInfo.h new file mode 100644 index 000000000..bf5942d1d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADResponseInfo.h @@ -0,0 +1,56 @@ +// +// GADResponseInfo.h +// Google Mobile Ads SDK +// +// Copyright 2019-2020 Google LLC. All rights reserved. +// + +#import + +/// Response metadata for an individual ad network in an ad response. +@interface GADAdNetworkResponseInfo : NSObject + +/// A class name that identifies the ad network. +@property(nonatomic, readonly, nonnull) NSString *adNetworkClassName; + +/// Network configuration set on the AdMob UI. +@property(nonatomic, readonly, nonnull) NSDictionary *credentials; + +/// Error associated with the request to the network. Nil if the network successfully loaded an ad +/// or if the network was not attempted. +@property(nonatomic, readonly, nullable) NSError *error; + +/// Amount of time the ad network spent loading an ad. 0 if the network was not attempted. +@property(nonatomic, readonly) NSTimeInterval latency; + +/// JSON-safe dictionary representation of the ad network response info. +@property(nonatomic, readonly, nonnull) NSDictionary *dictionaryRepresentation; + +@end + +/// Ad network class name for ads returned from Google's ad network. +extern NSString *_Nonnull const GADGoogleAdNetworkClassName; + +/// Ad network class name for custom event ads. +extern NSString *_Nonnull const GADCustomEventAdNetworkClassName; + +/// Key into NSError.userInfo mapping to a GADResponseInfo object. When ads fail to load, errors +/// returned contain an instance of GADResponseInfo. +extern NSString *_Nonnull GADErrorUserInfoKeyResponseInfo; + +/// Information about a response to an ad request. +@interface GADResponseInfo : NSObject + +/// Unique identifier of the ad response. +@property(nonatomic, readonly, nullable) NSString *responseIdentifier; + +/// A class name that identifies the ad network that returned the ad. Nil if no ad was returned. +@property(nonatomic, readonly, nullable) NSString *adNetworkClassName; + +/// Array of metadata for each ad network included in the response. +@property(nonatomic, readonly, nonnull) NSArray *adNetworkInfoArray; + +/// JSON-safe dictionary representation of the response info. +@property(nonatomic, readonly, nonnull) NSDictionary *dictionaryRepresentation; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedAd.h new file mode 100644 index 000000000..89ef59c81 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedAd.h @@ -0,0 +1,73 @@ +// +// GADRewardedAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import + +@class GADRewardedAd; + +/// A block to be executed when the ad request operation completes. On success, +/// rewardedAd is non-nil and |error| is nil. On failure, rewardedAd is nil +/// and |error| is non-nil. +typedef void (^GADRewardedAdLoadCompletionHandler)(GADRewardedAd *_Nullable rewardedAd, + NSError *_Nullable error); + +/// A rewarded ad. Rewarded ads are ads that users have the option of interacting with in exchange +/// for in-app rewards. +@interface GADRewardedAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// The reward earned by the user for interacting with the ad. +@property(nonatomic, readonly, nonnull) GADAdReward *adReward; + +/// Options specified for server-side user reward verification. Must be set before presenting this +/// ad. +@property(nonatomic, copy, nullable) + GADServerSideVerificationOptions *serverSideVerificationOptions; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads a rewarded ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADRewardedAdLoadCompletionHandler)completionHandler; + +/// Returns whether the rewarded ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the rewarded ad. Must be called on the main thread. +/// +/// @param rootViewController A view controller to present the ad. +/// @param userDidEarnRewardHandler A handler to execute when the user earns a reward. +- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController + userDidEarnRewardHandler:(nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h new file mode 100644 index 000000000..242d8fac1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADRewardedInterstitialAd.h @@ -0,0 +1,74 @@ +// +// GADRewardedInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import + +@class GADRewardedInterstitialAd; + +/// A block to be executed when the ad request operation completes. On success, +/// rewardedInterstitialAd is non-nil and |error| is nil. On failure, rewardedInterstitialAd is nil +/// and |error| is non-nil. +typedef void (^GADRewardedInterstitialAdLoadCompletionHandler)( + GADRewardedInterstitialAd *_Nullable rewardedInterstitialAd, NSError *_Nullable error); + +/// A rewarded interstitial ad. Rewarded Interstitial ads are full screen ads that can be presented +/// without user-opt in and allow you to reward the user with in-app items. +@interface GADRewardedInterstitialAd : NSObject + +/// The ad unit ID. +@property(nonatomic, readonly, nonnull) NSString *adUnitID; + +/// Information about the ad response that returned the ad. +@property(nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; + +/// The reward earned by the user for interacting with the ad. +@property(nonatomic, readonly, nonnull) GADAdReward *adReward; + +/// Options specified for server-side user reward verification. Must be set before presenting this +/// ad. +@property(nonatomic, copy, nullable) + GADServerSideVerificationOptions *serverSideVerificationOptions; + +/// Delegate for handling full screen content messages. +@property(nonatomic, weak, nullable) id fullScreenContentDelegate; + +/// Called when the ad is estimated to have earned money. Available for allowlisted accounts only. +@property(nonatomic, nullable, copy) GADPaidEventHandler paidEventHandler; + +/// Loads a rewarded interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the AdMob or Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADRewardedInterstitialAdLoadCompletionHandler)completionHandler; + +/// Returns whether the rewarded interstitial ad can be presented from the provided root view +/// controller. Sets the error out parameter if the ad can't be presented. Must be called on the +/// main thread. +- (BOOL)canPresentFromRootViewController:(nonnull UIViewController *)rootViewController + error:(NSError *_Nullable __autoreleasing *_Nullable)error; + +/// Presents the rewarded interstitial ad. Must be called on the main thread. +/// +/// @param viewController A view controller to present the ad. +/// @param userDidEarnRewardHandler A handler to execute when the user earns a reward. adReward +/// contains the reward information. +- (void)presentFromRootViewController:(nonnull UIViewController *)viewController + userDidEarnRewardHandler:(nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADSearchBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADSearchBannerView.h new file mode 100644 index 000000000..915d90972 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADSearchBannerView.h @@ -0,0 +1,24 @@ +// +// GADSearchBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google LLC. All rights reserved. +// + +#import +#import + +/// A view that displays search ads. +/// To show search ads: +/// 1) Create a GADSearchBannerView and add it to your view controller's view hierarchy. +/// 2) Create a GADDynamicHeightSearchRequest object to hold the search query and other search +/// data. +/// 3) Call GADSearchBannerView's -loadRequest: method with the +/// GADDynamicHeightSearchRequest object. +@interface GADSearchBannerView : GADBannerView + +/// If the banner view is initialized with kGADAdSizeFluid and the corresponding request is created +/// with dynamic height parameters, this delegate will be called when the ad size changes. +@property(nonatomic, weak, nullable) IBOutlet id adSizeDelegate; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h new file mode 100644 index 000000000..5223855fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADServerSideVerificationOptions.h @@ -0,0 +1,21 @@ +// +// GADServerSideVerificationOptions.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Options for server-side verification callbacks for a rewarded ad. +@interface GADServerSideVerificationOptions : NSObject + +/// A unique identifier used to identify the user when making server-side verification reward +/// callbacks. This value will be passed as a parameter of the callback URL to the publisher's +/// server. +@property(nonatomic, copy, nullable) NSString *userIdentifier; + +/// Optional custom reward string to include in the server-side verification callback. +@property(nonatomic, copy, nullable) NSString *customRewardString; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoController.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoController.h new file mode 100644 index 000000000..36b31dd49 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoController.h @@ -0,0 +1,42 @@ +// +// GADVideoController.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import +#import +#import + +@protocol GADVideoControllerDelegate; + +/// 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. +@interface GADVideoController : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak, nullable) id delegate; + +/// Mute or unmute video. Set to YES to mute the video. Set to NO to allow the video to play sound. +- (void)setMute:(BOOL)mute; + +/// Play the video. Doesn't do anything if the video is already playing. +- (void)play; + +/// Pause the video. Doesn't do anything if the video is already paused. +- (void)pause; + +/// Stops the video and displays the video's first frame. Call -play to resume playback at the start +/// of the video. Contact your account manager to enable this feature. +- (void)stop; + +/// Indicates whether video custom controls (i.e. play/pause/mute/unmute) are enabled. +- (BOOL)customControlsEnabled; + +/// Indicates whether video click to expand behavior is enabled. +- (BOOL)clickToExpandEnabled; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h new file mode 100644 index 000000000..37e0ad270 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h @@ -0,0 +1,32 @@ +// +// GADVideoControllerDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// The GADVideoControllerDelegate protocol defines methods that are called by the video controller +/// object in response to the video events that occurred throughout the lifetime of the video +/// rendered by an ad. +@protocol GADVideoControllerDelegate + +@optional + +/// Tells the delegate that the video controller has began or resumed playing a video. +- (void)videoControllerDidPlayVideo:(nonnull GADVideoController *)videoController; + +/// Tells the delegate that the video controller has paused video. +- (void)videoControllerDidPauseVideo:(nonnull GADVideoController *)videoController; + +/// Tells the delegate that the video controller's video playback has ended. +- (void)videoControllerDidEndVideoPlayback:(nonnull GADVideoController *)videoController; + +/// Tells the delegate that the video controller has muted video. +- (void)videoControllerDidMuteVideo:(nonnull GADVideoController *)videoController; + +/// Tells the delegate that the video controller has unmuted video. +- (void)videoControllerDidUnmuteVideo:(nonnull GADVideoController *)videoController; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoOptions.h new file mode 100644 index 000000000..46d8347e3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GADVideoOptions.h @@ -0,0 +1,23 @@ +// +// GADVideoOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Video ad options. +@interface GADVideoOptions : GADAdLoaderOptions + +/// Indicates whether videos should start muted. By default this property value is YES. +@property(nonatomic, assign) BOOL startMuted; + +/// Indicates whether the requested video should have custom controls enabled for +/// play/pause/mute/unmute. +@property(nonatomic, assign) BOOL customControlsRequested; + +/// Indicates whether the requested video should have the click to expand behavior. +@property(nonatomic, assign) BOOL clickToExpandRequested; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerView.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerView.h new file mode 100644 index 000000000..4d86dab20 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerView.h @@ -0,0 +1,84 @@ +// +// GAMBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import + +@class GAMBannerView; + +/// The delegate of a GADAdLoader object must conform to this protocol to receive GAMBannerViews. +@protocol GAMBannerAdLoaderDelegate + +/// Asks the delegate which banner ad sizes should be requested. +- (nonnull NSArray *)validBannerSizesForAdLoader:(nonnull GADAdLoader *)adLoader; + +/// Tells the delegate that a Google Ad Manager banner ad was received. +- (void)adLoader:(nonnull GADAdLoader *)adLoader + didReceiveGAMBannerView:(nonnull GAMBannerView *)bannerView; + +@end + +/// The view that displays Ad Manager banner ads. +/// +/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeGAMBanner (see +/// GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If you +/// request this ad type, your delegate must conform to the GAMBannerAdLoaderDelegate protocol. +@interface GAMBannerView : GADBannerView + +/// Required value created on the Ad Manager website. Create a new ad unit for every unique +/// placement of an ad in your application. Set this to the ID assigned for this placement. Ad units +/// are important for targeting and statistics. +/// +/// Example Ad Manager ad unit ID: @"/6499/example/banner" +@property(nonatomic, copy, nullable) NSString *adUnitID; + +/// Optional delegate that is notified when creatives send app events. +@property(nonatomic, weak, nullable) IBOutlet id appEventDelegate; + +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, nullable) IBOutlet id adSizeDelegate; + +/// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are +/// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined +/// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize +/// method. +/// +/// Example: +/// +/// \code +/// NSArray *validSizes = @[ +/// NSValueFromGADAdSize(kGADAdSizeBanner), +/// NSValueFromGADAdSize(kGADAdSizeLargeBanner) +/// ]; +/// +/// bannerView.validAdSizes = validSizes; +/// \endcode +@property(nonatomic, copy, nullable) NSArray *validAdSizes; + +/// Indicates that the publisher will record impressions manually when the ad becomes visible to the +/// user. +@property(nonatomic) BOOL enableManualImpressions; + +/// Video controller for controlling video rendered by this ad view. +@property(nonatomic, readonly, nonnull) GADVideoController *videoController; + +/// If you've set enableManualImpressions to YES, call this method when the ad is visible. +- (void)recordImpression; + +/// Use this function to resize the banner view without launching a new ad request. +- (void)resize:(GADAdSize)size; + +/// Sets options that configure ad loading. +/// +/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option +/// objects cannot be modified after calling this method. +- (void)setAdOptions:(nonnull NSArray *)adOptions; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h new file mode 100644 index 000000000..f2ef92bae --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMBannerViewOptions.h @@ -0,0 +1,16 @@ +// +// GAMBannerViewOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google LLC. All rights reserved. +// + +#import + +/// Ad loader options for banner ads. +@interface GAMBannerViewOptions : GADAdLoaderOptions + +/// Whether the publisher will record impressions manually when the ad becomes visible to the user. +@property(nonatomic, assign) BOOL enableManualImpressions; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h new file mode 100644 index 000000000..139ccc65a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMInterstitialAd.h @@ -0,0 +1,37 @@ +// +// GAMInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import +#import + +@class GAMInterstitialAd; +typedef void (^GAMInterstitialAdLoadCompletionHandler)(GAMInterstitialAd *_Nullable interstitialAd, + NSError *_Nullable error); + +/// Google Ad Manager interstitial ad, a full-screen advertisement shown at natural +/// transition points in your application such as between game levels or news stories. +@interface GAMInterstitialAd : GADInterstitialAd + +/// Optional delegate that is notified when creatives send app events. +@property(nonatomic, weak, nullable) id appEventDelegate; + +/// Loads an interstitial ad. +/// +/// @param adUnitID An ad unit ID created in the Ad Manager UI. +/// @param request An ad request object. If nil, a default ad request object is used. +/// @param completionHandler A handler to execute when the load operation finishes or times out. ++ (void)loadWithAdManagerAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GAMRequest *)request + completionHandler:(nonnull GAMInterstitialAdLoadCompletionHandler)completionHandler; + ++ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID + request:(nullable GADRequest *)request + completionHandler:(nonnull GADInterstitialAdLoadCompletionHandler)completionHandler + NS_UNAVAILABLE; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMRequest.h new file mode 100644 index 000000000..56b798b12 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GAMRequest.h @@ -0,0 +1,26 @@ +// +// GAMRequest.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google LLC. All rights reserved. +// + +#import +#import + +/// Add this constant to the testDevices property's array to receive test ads on the simulator. +GAD_EXTERN const id _Nonnull kGAMSimulatorID; + +/// Specifies optional parameters for ad requests. +@interface GAMRequest : GADRequest + +/// Publisher provided user ID. +@property(nonatomic, copy, nullable) NSString *publisherProvidedID; + +/// Array of strings used to exclude specified categories in ad results. +@property(nonatomic, copy, nullable) NSArray *categoryExclusions; + +/// Key-value pairs used for custom targeting. +@property(nonatomic, copy, nullable) NSDictionary *customTargeting; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAds.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAds.h new file mode 100644 index 000000000..bdd252c44 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAds.h @@ -0,0 +1,107 @@ +// +// GoogleMobileAds.h +// Google Mobile Ads SDK +// +// Copyright 2014 Google LLC. All rights reserved. + +#import +#import + +/// Project version string for GoogleMobileAds. +FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; + +// Header files. +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h new file mode 100644 index 000000000..19aade989 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h @@ -0,0 +1,63 @@ +// +// GoogleMobileAdsDefines.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google LLC. All rights reserved. +// + +#import + +#if defined(__cplusplus) +#define GAD_EXTERN extern "C" __attribute__((visibility("default"))) +#else +#define GAD_EXTERN extern __attribute__((visibility("default"))) +#endif // defined(__cplusplus) + +#if !defined(__has_feature) +#error "Use latest Xcode version." +#endif // !defined(__has_feature) + +#if !defined(__has_attribute) +#error "Use latest Xcode version." +#endif // !defined(__has_attribute) + +#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_deprecated_with_message) + +#if __has_attribute(deprecated) +#define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define GAD_DEPRECATED_ATTRIBUTE +#endif // __has_attribute(deprecated) + +#if __has_feature(nullability) // Available starting in Xcode 6.3. +#define GAD_NULLABLE_TYPE __nullable +#define GAD_NONNULL_TYPE __nonnull +#define GAD_NULLABLE nullable +#else +#error "Use latest Xcode version." +#endif // __has_feature(nullability) + +#if __has_attribute(objc_boxable) // Available starting in Xcode 7.3. +#define GAD_BOXABLE __attribute__((objc_boxable)) +#else +#error "Use latest Xcode version." +#endif // __has_attribute(objc_boxable) + +#if defined(NS_STRING_ENUM) // Available starting in Xcode 8.0. +#define GAD_STRING_ENUM NS_STRING_ENUM +#else +#error "Use latest Xcode version." +#endif + +// Pre-Xcode 11 versions must replace UIWindowScene with NSObject. +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 130000 +#ifndef UIWindowScene +#define UIWindowScene NSObject +#endif +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h new file mode 100644 index 000000000..b28d2321d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h @@ -0,0 +1,92 @@ +// +// GADMAdNetworkAdapterProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import +#import +#import +#import + +/// Subclasses should prefix their name with "GADMAdapter" example: GADMAdapterGoogleAdMobAds +#define kGADMAdapterClassNamePrefix @"GADMAdapter" + +/// Ad network adapter protocol. +@protocol GADMAdNetworkAdapter + +/// Returns a version string for the adapter. It can be any string that uniquely identifies the +/// adapter's version. For example, "1.0", or a date such as "20110915". ++ (NSString *)adapterVersion; + +/// Returns the extras class that is used by publishers to provide additional parameters to this +/// adapter. Returns Nil if the adapter doesn't have extra publisher provided settings. ++ (Class)networkExtrasClass; + +/// Designated initializer. Adapters can and should store a weak reference to the connector. +/// However, adapters must not keep a strong reference to the connector, as doing so creates a +/// reference cycle and abandoned memory. +- (instancetype)initWithGADMAdNetworkConnector:(id)connector; + +/// Asks the adapter to initiate an asynchronous banner ad request. The adapter may act as a +/// delegate to your SDK to listen to callbacks. If your SDK doesn't support the given ad size, or +/// doesn't support banner ads, call adapter:didFailAd: on the connector. +- (void)getBannerWithSize:(GADAdSize)adSize; + +/// Asks the adapter to initiate an asynchronous interstitial ad request. The adapter may act as a +/// delegate to your SDK to listen to callbacks. If your SDK doesn't support interstitials, call +/// adapter:didFailInterstitial: on the connector. +- (void)getInterstitial; + +/// When called, the adapter must remove strong references to itself (e.g., delegate properties and +/// notification observers). You should also call this method in your adapter dealloc to prevent +/// your SDK from interacting with the deallocated adapter. This function may be called multiple +/// times. +- (void)stopBeingDelegate; + +/// Presents an interstitial using the supplied UIViewController, by calling +/// presentViewController:animated:completion:. +/// +/// Your interstitial should not immediately present itself when it is received. Instead, you should +/// wait until this method is called on your adapter to present the interstitial. +/// +/// The adapter must call adapterWillPresentInterstitial: on the connector when the interstitial is +/// about to be presented, and adapterWillDismissInterstitial: and adapterDidDismissInterstitial: +/// when the interstitial is being dismissed. +- (void)presentInterstitialFromRootViewController:(UIViewController *)rootViewController; + +@optional + +/// Asks the adapter to initiate an asynchronous native ad request. |adTypes| contains the list of +/// native ad types requested. See GADAdLoaderAdTypes.h for available ad types. |options| contains +/// additional options configured by the publisher. See GADNativeAdImageAdLoaderOptions.h for +/// available image options. +/// +/// On ad load success or failure, call adapter:didReceiveNativeAdDataSource:mediationDelegate or +/// adapter:didFailAd: on the connector. +- (void)getNativeAdWithAdTypes:(NSArray *)adTypes + options:(NSArray *)options; + +/// Indicates if the adapter handles user clicks. If the adapter returns YES, it must handle user +/// clicks and notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. If the adapter returns +/// NO, the Google Mobile Ads SDK handles user clicks and notifies the adapter of clicks using +/// -[GADMediatedUnifiedNativeAd didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if the adapter handles user impressions tracking. If the adapter returns YES, the +/// Google Mobile Ads SDK will not track user impressions and the adapter must notify the +/// Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource +/// mediatedNativeAdDidRecordImpression:]. If the adapter returns NO, the Google Mobile Ads SDK +/// tracks user impressions and notifies the adapter of impressions using +/// -[GADMediatedUnifiedNativeAd didRecordImpression]. +- (BOOL)handlesUserImpressions; + +/// If your ad network handles multiple ad sizes for the same banner ad, implement this method to be +/// informed of banner size updates. Ad sizes typically change between kGADAdSizeSmartBannerPortrait +/// and kGADAdSizeSmartBannerLandscape. If this method is not implemented, the ad is removed from +/// the user interface when the size changes. +- (void)changeAdSizeTo:(GADAdSize)adSize; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h new file mode 100644 index 000000000..939ec10f7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h @@ -0,0 +1,92 @@ +// +// GADMAdNetworkConnectorProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import +#import + +@protocol GADMAdNetworkAdapter; + +/// Ad network adapters interact with the mediation SDK using an object that implements the +/// GADMAdNetworkConnector protocol. The connector object can be used to obtain necessary +/// information for ad requests, and to call back to the mediation SDK on ad request returns and +/// user interactions. +@protocol GADMAdNetworkConnector + +/// When you need to show a landing page or any other modal view, such as when a user clicks or when +/// your Ads SDK needs to show an interstitial, use this method to obtain a UIViewController that +/// you can use to show your modal view. Call the -presentViewController:animated:completion: method +/// of the returned UIViewController. +- (UIViewController *)viewControllerForPresentingModalView; + +/// Returns the preferred ad volume as a fraction of system volume (0.0 to 1.0). +- (float)adVolume; + +/// Returns whether the ad should be muted. +- (BOOL)adMuted; + +#pragma mark - Adapter Callbacks + +/// Tells the connector that the adapter failed to receive an ad. +- (void)adapter:(id)adapter didFailAd:(NSError *)error; + +/// Tells the connector that the adapter received a banner ad. +- (void)adapter:(id)adapter didReceiveAdView:(UIView *)view; + +/// Tells the connector that the adapter received an interstitial. +- (void)adapterDidReceiveInterstitial:(id)adapter; + +/// 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 +// interstitial ad. + +/// Tells the connector that the adapter recorded a user click. +- (void)adapterDidGetAdClick:(id)adapter; +/// Tells the connector that the adapter will leave the application because of a user action. +- (void)adapterWillLeaveApplication:(id)adapter; + +// Adapter should call as many of these as possible, during the lifecycle of the loaded banner ad. + +/// Tells the connector that the adapter will present a full screen modal. +- (void)adapterWillPresentFullScreenModal:(id)adapter; +/// Tells the connector that the adapter will dismiss a full screen modal. +- (void)adapterWillDismissFullScreenModal:(id)adapter; +/// Tells the connector that the adapter dismissed a full screen modal. +- (void)adapterDidDismissFullScreenModal:(id)adapter; + +// Adapter should call these methods during the lifecycle of the loaded interstitial ad. + +/// Tells the connector that the adapter will present an interstitial. +- (void)adapterWillPresentInterstitial:(id)adapter; +/// Tells the connector that the adapter will dismiss an interstitial. +- (void)adapterWillDismissInterstitial:(id)adapter; +/// Tells the connector that the adapter did dismiss an interstitial. +- (void)adapterDidDismissInterstitial:(id)adapter; + +#pragma mark Deprecated + +/// Deprecated. Use -adapterDidReceiveInterstitial:. +- (void)adapter:(id)adapter + didReceiveInterstitial:(NSObject *)interstitial + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidReceiveInterstitial:."); + +/// Deprecated. Use -adapterDidGetAdClick:. +- (void)adapter:(id)adapter + clickDidOccurInBanner:(UIView *)view + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidGetAdClick:."); + +/// Deprecated. Use -adapter:didFailAd:. +- (void)adapter:(id)adapter + didFailInterstitial:(NSError *)error GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapter:didFailAd:"); + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h new file mode 100644 index 000000000..1802598c2 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h @@ -0,0 +1,21 @@ +// +// GADMEnums.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import + +/// These are the types of animation we employ for transitions between two mediated ads. +typedef NS_ENUM(NSInteger, GADMBannerAnimationType) { + kGADMBannerAnimationTypeNone = 0, ///< No animation. + kGADMBannerAnimationTypeFlipFromLeft = 1, ///< Flip from left. + kGADMBannerAnimationTypeFlipFromRight = 2, ///< Flip from right. + kGADMBannerAnimationTypeCurlUp = 3, ///< Curl up. + kGADMBannerAnimationTypeCurlDown = 4, ///< Curl down. + kGADMBannerAnimationTypeSlideFromLeft = 5, ///< Slide from left. + kGADMBannerAnimationTypeSlideFromRight = 6, ///< Slide from right. + kGADMBannerAnimationTypeFadeIn = 7, ///< Fade in. + kGADMBannerAnimationTypeRandom = 8, ///< Random animation. +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h new file mode 100644 index 000000000..995fa55e2 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h @@ -0,0 +1,67 @@ +// +// GADMRewardBasedVideoAdNetworkAdapter.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import +#import +#import + +/// Your adapter must conform to this protocol to provide reward based video ads. +@protocol GADMRewardBasedVideoAdNetworkAdapter + +/// Returns a version string for the adapter. It can be any string that uniquely identifies the +/// version of your adapter. For example, "1.0", or simply a date such as "20110915". ++ (NSString *)adapterVersion; + +/// The extras class that is used to specify additional parameters for a request to this ad network. +/// Returns Nil if the network does not have extra settings for publishers to send. ++ (Class)networkExtrasClass; + +/// Returns an initialized instance of the adapter when mediation ad requests come in. The adapter +/// must only maintain a weak reference to the provided connector. +- (instancetype)initWithRewardBasedVideoAdNetworkConnector: + (id)connector; + +/// Tells the adapter to set up reward based video ads. The adapter should notify the Google Mobile +/// Ads SDK whether set up has succeeded or failed using callbacks provided in the connector. When +/// set up fails, the Google Mobile Ads SDK may try to set up the adapter again. +- (void)setUp; + +/// Tells the adapter to request a reward based video ad. This method is called after the adapter +/// has been set up. The adapter should notify the Google Mobile Ads SDK if the request succeeds or +/// fails using callbacks provided in the connector. +- (void)requestRewardBasedVideoAd; + +/// Tells the adapter to present the reward based video ad with the provided view controller. This +/// method is only called after the adapter successfully requested an ad. +- (void)presentRewardBasedVideoAdWithRootViewController:(UIViewController *)viewController; + +/// Tells the adapter to remove itself as a delegate or notification observer from the underlying ad +/// network SDK. +- (void)stopBeingDelegate; + +@optional + +/// Adapters that want to be initialized as early as possible should implement this method to +/// opt-into initialization when the publisher initializes the Google Mobile Ads SDK. If not +/// implemented, initWithRewardBasedVideoAdNetworkConnector: gets called the first time the +/// publisher loads a rewarded video ad. +- (instancetype)initWithRewardBasedVideoAdNetworkConnector: + (id)connector + credentials:(NSArray *)credentials; + +/// Returns an initialized instance of the adapter. The adapter must only maintain a weak reference +/// to the provided connector. +- (instancetype)initWithGADMAdNetworkConnector:(id)connector + GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithRewardBasedVideoAdNetworkConnector:."); + +/// Tells the adapter to set up reward based video ads with the provided user ID. The adapter should +/// notify the Google Mobile Ads SDK whether set up has succeeded or failed using callbacks provided +/// in the connector. When set up fails, the Google Mobile Ads SDK may try to set up the adapter +/// again. +- (void)setUpWithUserID:(NSString *)userID GAD_DEPRECATED_MSG_ATTRIBUTE("Use setUp."); + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h new file mode 100644 index 000000000..f717d6e0c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h @@ -0,0 +1,62 @@ +// +// GADMRewardBasedVideoAdNetworkConnectorProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import +#import + +@protocol GADMRewardBasedVideoAdNetworkAdapter; + +/// Reward based video ad network adapters interact with the mediation SDK using an object that +/// conforms to the GADMRewardBasedVideoAdNetworkConnector protocol. The connector object can be +/// used to obtain information for ad requests and to call back to the mediation SDK on ad responses +/// and user interactions. +@protocol GADMRewardBasedVideoAdNetworkConnector + +/// Tells the delegate that the adapter successfully set up a reward based video ad. +- (void)adapterDidSetUpRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that the adapter failed to set up a reward based video ad. +- (void)adapter:(id)rewardBasedVideoAdAdapter + didFailToSetUpRewardBasedVideoAdWithError:(NSError *)error; + +/// Tells the delegate that a reward based video ad was clicked. +- (void)adapterDidGetAdClick:(id)adapter; + +/// Tells the delegate that a reward based video ad has loaded. +- (void)adapterDidReceiveRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad has opened. +- (void)adapterDidOpenRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad has started playing. +- (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; + +/// Tells the delegate that the adapter has rewarded the user. +- (void)adapter:(id)rewardBasedVideoAd + didRewardUserWithReward:(GADAdReward *)reward; + +/// Tells the delegate that a reward based video ad's action will leave the application. +- (void)adapterWillLeaveApplication: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad failed to load. +- (void)adapter:(id)rewardBasedVideoAdAdapter + didFailToLoadRewardBasedVideoAdwithError:(NSError *)error; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h new file mode 100644 index 000000000..39184813a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h @@ -0,0 +1,94 @@ +// +// GADMediatedUnifiedNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// 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, readonly) BOOL hasVideoContent; + +/// Media content aspect ratio (width/height) or 0 if there's no media content. +@property(nonatomic, readonly) CGFloat mediaContentAspectRatio; + +/// The video's duration in seconds or 0 if there's no video or the duration is unknown. +@property(nonatomic, readonly) NSTimeInterval duration; + +/// The video's current playback time in seconds or 0 if there's no video or the current playback +/// time is unknown. +@property(nonatomic, readonly) NSTimeInterval currentTime; + +/// 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:(nonnull UIView *)view + clickableAssetViews: + (nonnull NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (nonnull NSDictionary *)nonclickableAssetViews + viewController:(nonnull 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:(nonnull GADNativeAssetIdentifier)assetName + view:(nonnull UIView *)view + viewController:(nonnull UIViewController *)viewController; + +/// Tells the receiver that it has untracked |view|. This method is called when the mediated native +/// ad 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 diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h new file mode 100644 index 000000000..96cd7e9a6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h @@ -0,0 +1,53 @@ +// +// GADMediatedUnifiedNativeAdNotificationSource.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google LLC. All rights reserved. +// + +#import +#import + +/// 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 opening the iTunes store) when handling methods +/// in GADMediatedUnifiedNativeAd. Adapters in such case should notify the Google Mobile Ads SDK by +/// calling the relevant methods from this class. +@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: + (nonnull 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:(nonnull id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. ++ (void)mediatedNativeAdWillPresentScreen:(nonnull id)mediatedNativeAd; + +/// Must be called by the adapter just before the in-app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdWillDismissScreen:(nonnull id)mediatedNativeAd; + +/// Must be called by the adapter after the in-app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdDidDismissScreen:(nonnull id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd leaves the application. ++ (void)mediatedNativeAdWillLeaveApplication: + (nonnull id)mediatedNativeAd; + +#pragma mark - Mediated Native Video Ad Notifications + +/// Called by the adapter when native video playback has begun or resumed. ++ (void)mediatedNativeAdDidPlayVideo:(nonnull id)mediatedNativeAd; + +/// Called by the adapter when native video playback has paused. ++ (void)mediatedNativeAdDidPauseVideo:(nonnull id)mediatedNativeAd; + +/// Called by the adapter when native video playback has ended. ++ (void)mediatedNativeAdDidEndVideoPlayback: + (nonnull id)mediatedNativeAd; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h new file mode 100644 index 000000000..df31f613b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAd.h @@ -0,0 +1,13 @@ +// +// GADMediationAd.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Rendered ad. Objects conforming to this protocol are created by the adapter and returned to +/// the Google Mobile Ads SDK via the adapter's render method completion handler. +@protocol GADMediationAd +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h new file mode 100644 index 000000000..8aa34245f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdConfiguration.h @@ -0,0 +1,51 @@ +// +// GADMediationAdConfiguration.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// Provided by the Google Mobile Ads SDK for the adapter to render the ad. Contains 3PAS and other +/// ad configuration information. +@interface GADMediationAdConfiguration : NSObject + +/// The ad string returned from the 3PAS. +@property(nonatomic, readonly, nullable) NSString *bidResponse; + +/// View controller to present from. This value must be read at presentation time to obtain the most +/// recent value. Must be accessed on the main queue. +@property(nonatomic, readonly, nullable) UIViewController *topViewController; + +/// Mediation configuration set by the publisher on the AdMob frontend. +@property(nonatomic, readonly, nonnull) GADMediationCredentials *credentials; + +/// PNG data containing a watermark that identifies the ad's source. +@property(nonatomic, readonly, nullable) NSData *watermark; + +/// Extras the publisher registered with -[GADRequest registerAdNetworkExtras:]. +@property(nonatomic, readonly, nullable) id extras; + +/// The value of childDirectedTreatment supplied by the publisher. Is nil if the publisher hasn't +/// specified child directed treatment. Is @YES if child directed treatment is enabled. +@property(nonatomic, readonly, nullable) NSNumber *childDirectedTreatment; + +/// Indicates whether the publisher is requesting test ads. +@property(nonatomic, readonly) BOOL isTestRequest; + +/// Indicates whether the publisher has specified latitude and longitude location. +@property(nonatomic, readonly) BOOL hasUserLocation; + +/// The user's latitude or 0 if location isn't specified. +@property(nonatomic, readonly) CGFloat userLatitude; + +/// The user's longitude or 0 if location isn't specified. +@property(nonatomic, readonly) CGFloat userLongitude; + +/// The user's location accuracy or 0 if location isn't specified. +@property(nonatomic, readonly) CGFloat userLocationAccuracyInMeters; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h new file mode 100644 index 000000000..3c31b7902 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdEventDelegate.h @@ -0,0 +1,90 @@ +// +// GADMediationAdEventDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import + +/// Reports information to the Google Mobile Ads SDK from the adapter. Adapters receive an ad event +/// delegate when they provide a GADMediationAd by calling a render completion handler. +@protocol GADMediationAdEventDelegate + +/// Notifies Google Mobile Ads SDK that an impression occurred on the GADMediationAd. +- (void)reportImpression; + +/// Notifies Google Mobile Ads SDK that a click occurred on the GADMediationAd. +- (void)reportClick; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd will present a full screen modal view. +- (void)willPresentFullScreenView; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd failed to present with an error. +- (void)didFailToPresentWithError:(nonnull NSError *)error; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd will dismiss a full screen modal view. +- (void)willDismissFullScreenView; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd finished dismissing a full screen modal +/// view. +- (void)didDismissFullScreenView; + +@end + +/// Reports banner related information to the Google Mobile Ads SDK from the adapter. +@protocol GADMediationBannerAdEventDelegate + +/// Notifies Google Mobile Ads SDK that an action on the GADMediationAd will cause the application +/// to move into the background. +- (void)willBackgroundApplication; + +@end + +/// Reports interstitial related information to the Google Mobile Ads SDK from the adapter. +@protocol GADMediationInterstitialAdEventDelegate + +/// Notifies Google Mobile Ads SDK that an action on the GADMediationAd will cause the application +/// to move into the background. +- (void)willBackgroundApplication; + +@end + +/// Reports native related information to the Google Mobile Ads SDK from the adapter. +@protocol GADMediationNativeAdEventDelegate + +/// Notifies Google Mobile Ads SDK that the GADMediationAd started video playback. +- (void)didPlayVideo; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd paused video playback. +- (void)didPauseVideo; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd's video playback finished. +- (void)didEndVideo; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd muted video playback. +- (void)didMuteVideo; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd unmuted video playback. +- (void)didUnmuteVideo; + +/// Notifies Google Mobile Ads SDK that an action on the GADMediationAd will cause the application +/// to move into the background. +- (void)willBackgroundApplication; + +@end + +/// Reports rewarded related information to the Google Mobile Ads SDK from the adapter. +@protocol GADMediationRewardedAdEventDelegate + +/// Notifies the Google Mobile Ads SDK that the GADMediationAd has rewarded the user with a reward. +- (void)didRewardUserWithReward:(nonnull GADAdReward *)reward; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd started video playback. +- (void)didStartVideo; + +/// Notifies Google Mobile Ads SDK that the GADMediationAd's video playback finished. +- (void)didEndVideo; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h new file mode 100644 index 000000000..06c6e6937 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h @@ -0,0 +1,72 @@ +// +// GADMediationAdRequest.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +#import +#import +#import +#import + +/// Provides information which can be used for making ad requests during mediation. +@protocol GADMediationAdRequest + +/// Publisher ID set by the publisher on the AdMob frontend. +- (nullable NSString *)publisherId; + +/// Mediation configurations set by the publisher on the AdMob frontend. +- (nullable NSDictionary *)credentials; + +/// Returns YES if the publisher is requesting test ads. +- (BOOL)testMode; + +/// The adapter's ad network extras specified in GADRequest. +- (nullable id)networkExtras; + +/// Returns the value of childDirectedTreatment supplied by the publisher. Returns nil if the +/// publisher hasn't specified child directed treatment. Returns @YES if child directed treatment is +/// enabled. +- (nullable NSNumber *)childDirectedTreatment; + +/// Returns the maximum ad content rating supplied by the publisher. Returns nil if the publisher +/// hasn't specified a max ad content rating. +- (nullable GADMaxAdContentRating)maxAdContentRating; + +/// Returns the value of underAgeOfConsent supplied by the publisher. Returns nil if the publisher +/// hasn't specified the user is under the age of consent. Returns @YES if the user is under the age +/// of consent. +- (nullable NSNumber *)underAgeOfConsent; + +/// Returns YES if the publisher has specified latitude and longitude location. +- (BOOL)userHasLocation; + +/// Returns the user's latitude or 0 if location isn't specified. +- (CGFloat)userLatitude; + +/// Returns the user's longitude or 0 if location isn't specified. +- (CGFloat)userLongitude; + +/// Returns the user's location accuracy or 0 if location isn't specified. +- (CGFloat)userLocationAccuracyInMeters; + +/// Returns user's location description. May return a value even if userHasLocation is NO. +- (nullable NSString *)userLocationDescription; + +/// Keywords describing the user's current activity. Example: @"Sport Scores". +- (nullable 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. +- (nullable NSDate *)userBirthday GAD_DEPRECATED_ATTRIBUTE; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h new file mode 100644 index 000000000..eba74b20b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdSize.h @@ -0,0 +1,15 @@ +// +// GADMediationAdSize.h +// Google Mobile Ads SDK +// +// Copyright 2019 Google. All rights reserved. +// + +#import + +/// Returns the closest valid ad size from possibleAdSizes as compared to |original|. The selected +/// size must be smaller than or equal in size to the original. The selected size must also be +/// within a configurable fraction of the width and height of the original. If no valid size exists, +/// returns kGADAdSizeInvalid. +GAD_EXTERN GADAdSize GADClosestValidSizeForAdSizes(GADAdSize original, + NSArray *_Nonnull possibleAdSizes); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h new file mode 100644 index 000000000..d91357874 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdapter.h @@ -0,0 +1,133 @@ +// +// GADMediationAdapter.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import +#import + +/// Called by the adapter after loading the banner ad or encountering an error. Returns an ad +/// event object to send ad events to the Google Mobile Ads SDK. The block returns nil if a delegate +/// couldn't be created or if the block has already been called. +typedef id _Nullable (^GADMediationBannerLoadCompletionHandler)( + _Nullable id ad, NSError *_Nullable error); + +/// Called by the adapter after loading the interscroller ad or encountering an error. Returns an ad +/// event object to send ad events to the Google Mobile Ads SDK. The block returns nil if a delegate +/// couldn't be created or if the block has already been called. +typedef id _Nullable ( + ^GADMediationInterscrollerAdLoadCompletionHandler)(_Nullable id ad, + NSError *_Nullable error); + +/// Called by the adapter after loading the interstitial ad or encountering an error. Returns an +/// ad event delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if a +/// delegate couldn't be created or if the block has already been called. +typedef id _Nullable ( + ^GADMediationInterstitialLoadCompletionHandler)(_Nullable id ad, + NSError *_Nullable error); + +/// Called by the adapter after loading the native ad or encountering an error. Returns an ad +/// event delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if a +/// delegate couldn't be created or if the block has already been called. +typedef id _Nullable (^GADMediationNativeLoadCompletionHandler)( + _Nullable id ad, NSError *_Nullable error); + +/// Called by the adapter after loading the rewarded ad or encountering an error. Returns an ad +/// event delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if a +/// delegate couldn't be created or if the block has already been called. +typedef id _Nullable ( + ^GADMediationRewardedLoadCompletionHandler)(_Nullable id ad, + NSError *_Nullable error); + +/// Executes when adapter set up completes. +typedef void (^GADMediationAdapterSetUpCompletionBlock)(NSError *_Nullable error); + +@protocol GADAdNetworkExtras; + +/// Receives messages and requests from the Google Mobile Ads SDK. Provides GMA to 3P SDK +/// communication. +/// +/// Adapters are initialized on a background queue and should avoid using the main queue until +/// load time. +@protocol GADMediationAdapter +/// Returns the adapter version. ++ (GADVersionNumber)adapterVersion; + +/// Returns the ad SDK version. ++ (GADVersionNumber)adSDKVersion; + +/// The extras class that is used to specify additional parameters for a request to this ad network. +/// Returns Nil if the network doesn't have publisher provided extras. ++ (nullable Class)networkExtrasClass; + +/// Returns an initialized mediation adapter. +- (nonnull instancetype)init; + +@optional + +/// Tells the adapter to set up its underlying ad network SDK and perform any necessary prefetching +/// or configuration work. The adapter must call completionHandler once the adapter can service ad +/// requests, or if it encounters an error while setting up. ++ (void)setUpWithConfiguration:(nonnull GADMediationServerConfiguration *)configuration + completionHandler:(nonnull GADMediationAdapterSetUpCompletionBlock)completionHandler; + +/// Asks the adapter to load a banner ad with the provided ad configuration. The adapter must call +/// back completionHandler with the loaded ad, or it may call back with an error. This method is +/// called on the main thread, and completionHandler must be called back on the main thread. +- (void)loadBannerForAdConfiguration:(nonnull GADMediationBannerAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationBannerLoadCompletionHandler)completionHandler; + +/// Asks the adapter to load an interscroller ad with the provided ad configuration. The adapter +/// must call back completionHandler with the loaded ad, or it may call back with an error. This +/// method is called on the main thread, and completionHandler must be called back on the main +/// thread. +- (void)loadInterscrollerAdForAdConfiguration: + (nonnull GADMediationBannerAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationInterscrollerAdLoadCompletionHandler) + completionHandler; + +/// Asks the adapter to load an interstitial ad with the provided ad configuration. The adapter +/// must call back completionHandler with the loaded ad, or it may call back with an error. This +/// method is called on the main thread, and completionHandler must be called back on the main +/// thread. +- (void)loadInterstitialForAdConfiguration: + (nonnull GADMediationInterstitialAdConfiguration *)adConfiguration + completionHandler:(nonnull GADMediationInterstitialLoadCompletionHandler) + completionHandler; + +/// Asks the adapter to load a native ad with the provided ad configuration. The adapter must call +/// back completionHandler with the loaded ad, or it may call back with an error. This method is +/// called on the main thread, and completionHandler must be called back on the main thread. +- (void)loadNativeAdForAdConfiguration:(nonnull GADMediationNativeAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationNativeLoadCompletionHandler)completionHandler; + +/// Asks the adapter to load a rewarded ad with the provided ad configuration. The adapter must +/// call back completionHandler with the loaded ad, or it may call back with an error. This method +/// is called on the main thread, and completionHandler must be called back on the main thread. +- (void)loadRewardedAdForAdConfiguration: + (nonnull GADMediationRewardedAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationRewardedLoadCompletionHandler)completionHandler; + +/// Asks the adapter to load a rewarded interstitial ad with the provided ad configuration. The +/// adapter must call back completionHandler with the loaded ad, or it may call back with an error. +/// This method is called on the main thread, and completionHandler must be called back on the main +/// thread. +- (void)loadRewardedInterstitialAdForAdConfiguration: + (nonnull GADMediationRewardedAdConfiguration *)adConfiguration + completionHandler: + (nonnull GADMediationRewardedLoadCompletionHandler) + completionHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h new file mode 100644 index 000000000..57b73f185 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationBannerAd.h @@ -0,0 +1,41 @@ +// +// GADMediationBannerAd.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import + +/// Rendered banner ad. Provides a single subview to add to the banner view's view hierarchy. +@protocol GADMediationBannerAd + +/// The banner ad view. +@property(nonatomic, readonly, nonnull) UIView *view; + +@optional + +/// Tells the ad to resize the banner. Implement if banner content is resizable. +- (void)changeAdSizeTo:(GADAdSize)adSize; +@end + +/// Rendered interscroller ad. +@protocol GADMediationInterscrollerAd + +/// Indicates whether the interscroller rendering effect should be delegated to the Google Mobile +/// Ads SDK. +@property(nonatomic, assign) BOOL delegateInterscrollerEffect; + +@end + +/// Banner ad configuration. +@interface GADMediationBannerAdConfiguration : GADMediationAdConfiguration + +/// Banner ad size requested of the adapter. +@property(nonatomic, readonly) GADAdSize adSize; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h new file mode 100644 index 000000000..05ea90f24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationInterstitialAd.h @@ -0,0 +1,23 @@ +// +// GADMediationInterstitialAd.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import + +/// Rendered interstitial ad. +@protocol GADMediationInterstitialAd + +/// Presents the receiver from the view controller. +- (void)presentFromViewController:(nonnull UIViewController *)viewController; + +@end + +/// Interstitial ad configuration. +@interface GADMediationInterstitialAdConfiguration : GADMediationAdConfiguration +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h new file mode 100644 index 000000000..74292cad0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAd.h @@ -0,0 +1,42 @@ +// +// GADMediationNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import +#import +#import +#import + +/// Rendered native ad. +@protocol GADMediationNativeAd + +@optional + +/// Indicates whether the ad handles user clicks. If this method returns YES, the ad must handle +/// user clicks and notify the Google Mobile Ads SDK of clicks using +/// -[GADMediationAdEventDelegate reportClick:]. If this method returns NO, the Google Mobile Ads +/// SDK handles user clicks and notifies the ad of clicks using -[GADMediationNativeAd +/// didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates whether the ad handles user impressions tracking. If this method returns YES, the +/// Google Mobile Ads SDK will not track user impressions and the ad must notify the +/// Google Mobile Ads SDK of impressions using -[GADMediationAdEventDelegate +/// reportImpression:]. If this method returns NO, the Google Mobile Ads SDK tracks user impressions +/// and notifies the ad of impressions using -[GADMediationNativeAd didRecordImpression:]. +- (BOOL)handlesUserImpressions; +@end + +/// Native ad configuration. +@interface GADMediationNativeAdConfiguration : GADMediationAdConfiguration + +/// Additional options configured by the publisher for requesting a native ad. +@property(nonatomic, readonly, nonnull) NSArray *options; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h new file mode 100644 index 000000000..dc82714d4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationNativeAdAssetIdentifiers.h @@ -0,0 +1,35 @@ +// +// GADMediationNativeAdAssetIdentifiers.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +typedef NSString *GADUnifiedNativeAssetIdentifier NS_STRING_ENUM + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); + +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeHeadlineAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeCallToActionAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeIconAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeBodyAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStoreAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativePriceAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeImageAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStarRatingAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdvertiserAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeMediaViewAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); +GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdChoicesViewAsset + GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADNativeAssetIdentifier."); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h new file mode 100644 index 000000000..053a6c529 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRequestError.h @@ -0,0 +1,69 @@ +// +// GADMediationRequestError.h +// Google Mobile Ads SDK +// +// Copyright 2020 Google LLC. All rights reserved. +// + +#import +#import + +/// Google AdMob Ads error domain. +GAD_EXTERN NSString *_Nonnull const kGADErrorDomain; + +/// NSError codes for GAD error domain. +typedef NS_ENUM(NSInteger, GADMediationErrorCode) { + /// The ad request is invalid. The localizedFailureReason error description will have more + /// details. Typically this is because the ad did not have the ad unit ID or root view + /// controller set. + kGADErrorInvalidRequest = 0, + + /// The ad request was successful, but no ad was returned. + kGADErrorNoFill = 1, + + /// There was an error loading data from the network. + kGADErrorNetworkError = 2, + + /// The ad server experienced a failure processing the request. + kGADErrorServerError = 3, + + /// The current device's OS is below the minimum required version. + kGADErrorOSVersionTooLow = 4, + + /// The request was unable to be loaded before being timed out. + kGADErrorTimeout = 5, + + /// Will not send request because the interstitial object has already been used. + kGADErrorInterstitialAlreadyUsed GAD_DEPRECATED_MSG_ATTRIBUTE("Use kGADErrorAdAlreadyUsed.") = 6, + + /// The mediation response was invalid. + kGADErrorMediationDataError = 7, + + /// Error finding or creating a mediation ad network adapter. + kGADErrorMediationAdapterError = 8, + + /// Attempting to pass an invalid ad size to an adapter. + kGADErrorMediationInvalidAdSize = 10, + + /// Internal error. + kGADErrorInternalError = 11, + + /// Invalid argument error. + kGADErrorInvalidArgument = 12, + + /// Received invalid response. + kGADErrorReceivedInvalidResponse = 13, + + /// Will not send request because the rewarded ad object has already been used. + kGADErrorRewardedAdAlreadyUsed GAD_DEPRECATED_MSG_ATTRIBUTE("Use kGADErrorAdAlreadyUsed.") = 14, + + /// A mediation ad network adapter received an ad request, but did not fill. The adapter's error + /// is included as an underlyingError. + kGADErrorMediationNoFill = 9, + + /// Will not send request because the ad object has already been used. + kGADErrorAdAlreadyUsed = 19, + + /// Will not send request because the application identifier is missing. + kGADErrorApplicationIdentifierMissing = 20, +} GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADErrorCode."); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h new file mode 100644 index 000000000..27e339188 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationRewardedAd.h @@ -0,0 +1,20 @@ +// +// GADMediationRewardedAd.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import + +/// Rendered rewarded ad. +@protocol GADMediationRewardedAd +- (void)presentFromViewController:(nonnull UIViewController *)viewController; +@end + +/// Rewarded ad configuration. +@interface GADMediationRewardedAdConfiguration : GADMediationAdConfiguration +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h new file mode 100644 index 000000000..9f9ea6846 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADMediationServerConfiguration.h @@ -0,0 +1,29 @@ +// +// GADMediationServerConfiguration.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import + +/// Mediation configuration set by the publisher on the AdMob UI. +@interface GADMediationCredentials : NSObject + +/// The AdMob UI settings. +@property(nonatomic, readonly, nonnull) NSDictionary *settings; + +/// The ad format associated with the credentials. +@property(nonatomic, readonly) GADAdFormat format; + +@end + +/// Third party SDK configuration. +@interface GADMediationServerConfiguration : NSObject + +/// Array of mediation configurations set by the publisher on the AdMob UI. Each configuration is a +/// possible credential dictionary that the Google Mobile Ads SDK may provide at ad request time. +@property(nonatomic, readonly, nonnull) NSArray *credentials; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h new file mode 100644 index 000000000..70c7c18d9 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/Mediation/GADVersionNumber.h @@ -0,0 +1,21 @@ +// +// GADVersionNumber.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import + +/// Version number information. +typedef struct GADVersionNumber GADVersionNumber; + +/// Version number information. +struct GADVersionNumber { + /// Major version. + NSInteger majorVersion; + /// Minor version. + NSInteger minorVersion; + /// Patch version. + NSInteger patchVersion; +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h new file mode 100644 index 000000000..0e293b8dc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBAdapter.h @@ -0,0 +1,30 @@ +// +// GADRTBAdapter.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import + +/// Completion handler for signal generation. Returns either signals or an error object. +typedef void (^GADRTBSignalCompletionHandler)(NSString *_Nullable signals, + NSError *_Nullable error); + +/// Adapter that provides signals to the Google Mobile Ads SDK to be included in an auction. +@protocol GADRTBAdapter + +/// Returns an initialized RTB adapter. +- (nonnull instancetype)init; + +/// Asks the receiver for encrypted signals. Signals are provided to the 3PAS at request time. The +/// receiver must call completionHandler with signals or an error. +/// +/// This method is called on a non-main thread. The receiver should avoid using the main thread to +/// prevent signal collection timeouts. +- (void)collectSignalsForRequestParameters:(nonnull GADRTBRequestParameters *)params + completionHandler:(nonnull GADRTBSignalCompletionHandler)completionHandler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h new file mode 100644 index 000000000..1fad5b7af --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Headers/RTBMediation/GADRTBRequestParameters.h @@ -0,0 +1,37 @@ +// +// GADRTBRequestParameters.h +// Google Mobile Ads SDK +// +// Copyright 2018 Google LLC. All rights reserved. +// + +#import +#import +#import +#import + +/// Mediation configuration for a particular ad request. +@interface GADRTBMediationSignalsConfiguration : NSObject + +/// Array of mediation credential configurations set by the publisher on the AdMob UI. Each +/// credential configuration is a possible source of ads for the request. The real-time bidding +/// request will include a subset of these configurations. +@property(nonatomic, readonly, nonnull) NSArray *credentials; + +@end + +/// Request parameters provided by the publisher and Google Mobile Ads SDK. +@interface GADRTBRequestParameters : NSObject + +/// Mediation configuration for this request set by the publisher on the AdMob UI. +@property(nonatomic, readonly, nonnull) GADRTBMediationSignalsConfiguration *configuration; + +/// Extras the publisher registered with -[GADRequest registerAdNetworkExtras:]. +@property(nonatomic, readonly, nullable) id extras; + +#pragma mark - Banner parameters + +/// Requested banner ad size. The ad size is kGADAdSizeInvalid for non-banner requests. +@property(nonatomic, readonly) GADAdSize adSize; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Modules/module.modulemap new file mode 100644 index 000000000..2e2060cb7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleMobileAds.xcframework/ios-arm64_x86_64-simulator/GoogleMobileAds.framework/Modules/module.modulemap @@ -0,0 +1,125 @@ +framework module GoogleMobileAds { + umbrella header "GoogleMobileAds.h" + + export * + module * { export * } + + link "sqlite3" + link "z" + + link framework "AdSupport" + link framework "AudioToolbox" + link framework "AVFoundation" + link framework "CFNetwork" + link framework "CoreGraphics" + link framework "CoreMedia" + link framework "CoreTelephony" + link framework "CoreVideo" + link framework "Foundation" + link framework "JavaScriptCore" + link framework "MediaPlayer" + link framework "MessageUI" + link framework "MobileCoreServices" + link framework "QuartzCore" + link framework "SafariServices" + link framework "Security" + link framework "StoreKit" + link framework "SystemConfiguration" + link framework "UIKit" + link framework "WebKit" + + header "GADAdChoicesView.h" + header "GADAdFormat.h" + header "GADAdLoader.h" + header "GADAdLoaderAdTypes.h" + header "GADAdLoaderDelegate.h" + header "GADAdMetadata.h" + header "GADAdNetworkExtras.h" + header "GADAdReward.h" + header "GADAdSize.h" + header "GADAdSizeDelegate.h" + header "GADAdValue.h" + header "GADAppEventDelegate.h" + header "GADAppOpenAd.h" + header "GADAudioVideoManager.h" + header "GADAudioVideoManagerDelegate.h" + header "GADBannerView.h" + header "GADBannerViewDelegate.h" + header "GADCustomEventBanner.h" + header "GADCustomEventBannerDelegate.h" + header "GADCustomEventExtras.h" + header "GADCustomEventInterstitial.h" + header "GADCustomEventInterstitialDelegate.h" + header "GADCustomEventNativeAd.h" + header "GADCustomEventNativeAdDelegate.h" + header "GADCustomEventParameters.h" + header "GADCustomEventRequest.h" + header "GADCustomNativeAd.h" + header "GADCustomNativeAdDelegate.h" + header "GADDebugOptionsViewController.h" + header "GADDelayedAdRenderingOptions.h" + header "GADDisplayAdMeasurement.h" + header "GADDynamicHeightSearchRequest.h" + header "GADExtras.h" + header "GADFullScreenContentDelegate.h" + header "GADInitializationStatus.h" + header "GADInterstitialAd.h" + header "GADMediaAspectRatio.h" + header "GADMediaContent.h" + header "GADMediaView.h" + header "GADMobileAds.h" + header "GADMultipleAdsAdLoaderOptions.h" + header "GADMuteThisAdReason.h" + header "GADNativeAd+ConfirmationClick.h" + header "GADNativeAd+CustomClickGesture.h" + header "GADNativeAd.h" + header "GADNativeAdAssetIdentifiers.h" + header "GADNativeAdDelegate.h" + header "GADNativeAdImage+Mediation.h" + header "GADNativeAdImage.h" + header "GADNativeAdImageAdLoaderOptions.h" + header "GADNativeAdMediaAdLoaderOptions.h" + header "GADNativeAdUnconfirmedClickDelegate.h" + header "GADNativeAdViewAdOptions.h" + header "GADNativeMuteThisAdLoaderOptions.h" + header "GADPresentationError.h" + header "GADRequest.h" + header "GADRequestConfiguration.h" + header "GADRequestError.h" + header "GADResponseInfo.h" + header "GADRewardedAd.h" + header "GADRewardedInterstitialAd.h" + header "GADSearchBannerView.h" + header "GADServerSideVerificationOptions.h" + header "GADVideoController.h" + header "GADVideoControllerDelegate.h" + header "GADVideoOptions.h" + header "GAMBannerView.h" + header "GAMBannerViewOptions.h" + header "GAMInterstitialAd.h" + header "GAMRequest.h" + header "GoogleMobileAdsDefines.h" + header "Mediation/GADMAdNetworkAdapterProtocol.h" + header "Mediation/GADMAdNetworkConnectorProtocol.h" + header "Mediation/GADMEnums.h" + header "Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h" + header "Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h" + header "Mediation/GADMediatedUnifiedNativeAd.h" + header "Mediation/GADMediatedUnifiedNativeAdNotificationSource.h" + header "Mediation/GADMediationAd.h" + header "Mediation/GADMediationAdConfiguration.h" + header "Mediation/GADMediationAdEventDelegate.h" + header "Mediation/GADMediationAdRequest.h" + header "Mediation/GADMediationAdSize.h" + header "Mediation/GADMediationAdapter.h" + header "Mediation/GADMediationBannerAd.h" + header "Mediation/GADMediationInterstitialAd.h" + header "Mediation/GADMediationNativeAd.h" + header "Mediation/GADMediationNativeAdAssetIdentifiers.h" + header "Mediation/GADMediationRequestError.h" + header "Mediation/GADMediationRewardedAd.h" + header "Mediation/GADMediationServerConfiguration.h" + header "Mediation/GADVersionNumber.h" + header "RTBMediation/GADRTBAdapter.h" + header "RTBMediation/GADRTBRequestParameters.h" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/Info.plist new file mode 100644 index 000000000..35374f528 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/Info.plist @@ -0,0 +1,95 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + macos-x86_64 + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + macos + + + LibraryIdentifier + tvos-arm64 + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + tvos + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-x86_64-maccatalyst + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + tvos-arm64_x86_64-simulator + LibraryPath + GoogleUtilities.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + tvos + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..4bcfd9a60 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULObjectSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULObjectSwizzler.h new file mode 100644 index 000000000..b0a692a33 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULObjectSwizzler.h @@ -0,0 +1,123 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Enums that map to their OBJC-prefixed counterparts. */ +typedef OBJC_ENUM(uintptr_t, GUL_ASSOCIATION){ + + // Is a weak association. + GUL_ASSOCIATION_ASSIGN, + + // Is a nonatomic strong association. + GUL_ASSOCIATION_RETAIN_NONATOMIC, + + // Is a nonatomic copy association. + GUL_ASSOCIATION_COPY_NONATOMIC, + + // Is an atomic strong association. + GUL_ASSOCIATION_RETAIN, + + // Is an atomic copy association. + GUL_ASSOCIATION_COPY}; + +/** This class handles swizzling a specific instance of a class by generating a + * dynamic subclass and installing selectors and properties onto the dynamic + * subclass. Then, the instance's class is set to the dynamic subclass. There + * should be a 1:1 ratio of object swizzlers to swizzled instances. + */ +@interface GULObjectSwizzler : NSObject + +/** The subclass that is generated. */ +@property(nullable, nonatomic, readonly) Class generatedClass; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ ++ (void)setAssociatedObject:(id)object + key:(NSString *)key + value:(nullable id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + */ ++ (nullable id)getAssociatedObject:(id)object key:(NSString *)key; + +/** Please use the designated initializer. */ +- (instancetype)init NS_UNAVAILABLE; + +/** Instantiates an object swizzler using an object it will operate on. + * Generates a new class pair. + * + * @note There is no need to store this object. After calling -swizzle, this + * object can be found by calling -gul_objectSwizzler + * + * @param object The object to be swizzled. + * @return An instance of this class. + */ +- (instancetype)initWithObject:(id)object NS_DESIGNATED_INITIALIZER; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ +- (void)setAssociatedObjectWithKey:(NSString *)key + value:(id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + */ +- (nullable id)getAssociatedObjectForKey:(NSString *)key; + +/** Copies a selector from an existing class onto the generated dynamic subclass + * that this object will adopt. This mechanism can be used to add methods to + * specific instances of a class. + * + * @note Should not be called after calling -swizzle. + * @param selector The selector to add to the instance. + * @param aClass The class supplying an implementation of the method. + * @param isClassSelector A BOOL specifying whether the selector is a class or + * instance selector. + */ +- (void)copySelector:(SEL)selector fromClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Swizzles the object, changing its class to the generated class. Registers + * the class pair. */ +- (void)swizzle; + +/** @return The value of -[objectBeingSwizzled isProxy] */ +- (BOOL)isSwizzlingProxyObject; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h new file mode 100644 index 000000000..a33262af0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h @@ -0,0 +1,207 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * GULOriginalIMPConvenienceMacros.h + * + * This header contains convenience macros for invoking the original IMP of a swizzled method. + */ + +/** + * Invokes original IMP when the original selector takes no arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + */ +#define GUL_INVOKE_ORIGINAL_IMP0(__receivingObject, __swizzledSEL, __returnType, __originalIMP) \ + ((__returnType(*)(id, SEL))__originalIMP)(__receivingObject, __swizzledSEL) + +/** + * Invokes original IMP when the original selector takes 1 argument. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP1(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1)))__originalIMP)(__receivingObject, __swizzledSEL, \ + __arg1) + +/** + * Invokes original IMP when the original selector takes 2 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP2(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2) + +/** + * Invokes original IMP when the original selector takes 3 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP3(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), \ + __typeof__(__arg3)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3) + +/** + * Invokes original IMP when the original selector takes 4 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP4(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3, __arg4) + +/** + * Invokes original IMP when the original selector takes 5 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP5(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5) + +/** + * Invokes original IMP when the original selector takes 6 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP6(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) + +/** + * Invokes original IMP when the original selector takes 7 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP7(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) + +/** + * Invokes original IMP when the original selector takes 8 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP8(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8) + +/** + * Invokes original IMP when the original selector takes 9 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + * @param __arg9 The ninth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP9(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8, \ + __arg9) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8), __typeof__(__arg9)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8, __arg9) diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzledObject.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzledObject.h new file mode 100644 index 000000000..314ceecdf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzledObject.h @@ -0,0 +1,44 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class GULObjectSwizzler; + +FOUNDATION_EXPORT NSString *kSwizzlerAssociatedObjectKey; + +/** This class exists as a method donor. These methods will be added to all objects that are + * swizzled by the object swizzler. This class should not be instantiated. + */ +@interface GULSwizzledObject : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Copies the methods below to the swizzled object. + * + * @param objectSwizzler The swizzler to use when adding the methods below. + */ ++ (void)copyDonorSelectorsUsingObjectSwizzler:(GULObjectSwizzler *)objectSwizzler; + +#pragma mark - Donor methods. + +/** @return The generated subclass. Used in respondsToSelector: calls. */ +- (Class)gul_class; + +/** @return The object swizzler that manages this object. */ +- (GULObjectSwizzler *)gul_objectSwizzler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzler.h new file mode 100644 index 000000000..26949c886 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULSwizzler.h @@ -0,0 +1,71 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This class handles the runtime manipulation necessary to instrument selectors. It stores the + * classes and selectors that have been swizzled, and runs all operations on its own queue. + */ +@interface GULSwizzler : NSObject + +/** Manipulates the Objective-C runtime to replace the original IMP with the supplied block. + * + * @param aClass The class to swizzle. + * @param selector The selector of the class to swizzle. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @param block The block that replaces the original IMP. + */ ++ (void)swizzleClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector + withBlock:(nullable id)block; + +/** Returns the current IMP for the given class and selector. + * + * @param aClass The class to use. + * @param selector The selector to find the implementation of. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return The implementation of the selector in the runtime. + */ ++ (nullable IMP)currentImplementationForClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector; + +/** Checks the runtime to see if a selector exists on a class. If a property is declared as + * @dynamic, we have a reverse swizzling situation, where the implementation of a method exists + * only in concrete subclasses, and NOT in the superclass. We can detect that situation using + * this helper method. Similarly, we can detect situations where a class doesn't implement a + * protocol method. + * + * @param selector The selector to check for. + * @param aClass The class to check. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return YES if the method was found in this selector/class combination, NO otherwise. + */ ++ (BOOL)selector:(SEL)selector existsInClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Returns a list of all Objective-C (and not primitive) ivars contained by the given object. + * + * @param object The object whose ivars will be iterated. + * @return The list of ivar objects. + */ ++ (NSArray *)ivarObjectsForObject:(id)object; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..eb2e472f1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,41 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULObjectSwizzler.h" +#import "GULSwizzledObject.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULOriginalIMPConvenienceMacros.h" +#import "GULSwizzler.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_armv7/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..15168eeae Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULObjectSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULObjectSwizzler.h new file mode 100644 index 000000000..b0a692a33 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULObjectSwizzler.h @@ -0,0 +1,123 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Enums that map to their OBJC-prefixed counterparts. */ +typedef OBJC_ENUM(uintptr_t, GUL_ASSOCIATION){ + + // Is a weak association. + GUL_ASSOCIATION_ASSIGN, + + // Is a nonatomic strong association. + GUL_ASSOCIATION_RETAIN_NONATOMIC, + + // Is a nonatomic copy association. + GUL_ASSOCIATION_COPY_NONATOMIC, + + // Is an atomic strong association. + GUL_ASSOCIATION_RETAIN, + + // Is an atomic copy association. + GUL_ASSOCIATION_COPY}; + +/** This class handles swizzling a specific instance of a class by generating a + * dynamic subclass and installing selectors and properties onto the dynamic + * subclass. Then, the instance's class is set to the dynamic subclass. There + * should be a 1:1 ratio of object swizzlers to swizzled instances. + */ +@interface GULObjectSwizzler : NSObject + +/** The subclass that is generated. */ +@property(nullable, nonatomic, readonly) Class generatedClass; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ ++ (void)setAssociatedObject:(id)object + key:(NSString *)key + value:(nullable id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + */ ++ (nullable id)getAssociatedObject:(id)object key:(NSString *)key; + +/** Please use the designated initializer. */ +- (instancetype)init NS_UNAVAILABLE; + +/** Instantiates an object swizzler using an object it will operate on. + * Generates a new class pair. + * + * @note There is no need to store this object. After calling -swizzle, this + * object can be found by calling -gul_objectSwizzler + * + * @param object The object to be swizzled. + * @return An instance of this class. + */ +- (instancetype)initWithObject:(id)object NS_DESIGNATED_INITIALIZER; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ +- (void)setAssociatedObjectWithKey:(NSString *)key + value:(id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + */ +- (nullable id)getAssociatedObjectForKey:(NSString *)key; + +/** Copies a selector from an existing class onto the generated dynamic subclass + * that this object will adopt. This mechanism can be used to add methods to + * specific instances of a class. + * + * @note Should not be called after calling -swizzle. + * @param selector The selector to add to the instance. + * @param aClass The class supplying an implementation of the method. + * @param isClassSelector A BOOL specifying whether the selector is a class or + * instance selector. + */ +- (void)copySelector:(SEL)selector fromClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Swizzles the object, changing its class to the generated class. Registers + * the class pair. */ +- (void)swizzle; + +/** @return The value of -[objectBeingSwizzled isProxy] */ +- (BOOL)isSwizzlingProxyObject; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h new file mode 100644 index 000000000..a33262af0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h @@ -0,0 +1,207 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * GULOriginalIMPConvenienceMacros.h + * + * This header contains convenience macros for invoking the original IMP of a swizzled method. + */ + +/** + * Invokes original IMP when the original selector takes no arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + */ +#define GUL_INVOKE_ORIGINAL_IMP0(__receivingObject, __swizzledSEL, __returnType, __originalIMP) \ + ((__returnType(*)(id, SEL))__originalIMP)(__receivingObject, __swizzledSEL) + +/** + * Invokes original IMP when the original selector takes 1 argument. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP1(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1)))__originalIMP)(__receivingObject, __swizzledSEL, \ + __arg1) + +/** + * Invokes original IMP when the original selector takes 2 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP2(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2) + +/** + * Invokes original IMP when the original selector takes 3 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP3(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), \ + __typeof__(__arg3)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3) + +/** + * Invokes original IMP when the original selector takes 4 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP4(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3, __arg4) + +/** + * Invokes original IMP when the original selector takes 5 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP5(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5) + +/** + * Invokes original IMP when the original selector takes 6 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP6(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) + +/** + * Invokes original IMP when the original selector takes 7 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP7(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) + +/** + * Invokes original IMP when the original selector takes 8 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP8(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8) + +/** + * Invokes original IMP when the original selector takes 9 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + * @param __arg9 The ninth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP9(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8, \ + __arg9) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8), __typeof__(__arg9)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8, __arg9) diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzledObject.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzledObject.h new file mode 100644 index 000000000..314ceecdf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzledObject.h @@ -0,0 +1,44 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class GULObjectSwizzler; + +FOUNDATION_EXPORT NSString *kSwizzlerAssociatedObjectKey; + +/** This class exists as a method donor. These methods will be added to all objects that are + * swizzled by the object swizzler. This class should not be instantiated. + */ +@interface GULSwizzledObject : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Copies the methods below to the swizzled object. + * + * @param objectSwizzler The swizzler to use when adding the methods below. + */ ++ (void)copyDonorSelectorsUsingObjectSwizzler:(GULObjectSwizzler *)objectSwizzler; + +#pragma mark - Donor methods. + +/** @return The generated subclass. Used in respondsToSelector: calls. */ +- (Class)gul_class; + +/** @return The object swizzler that manages this object. */ +- (GULObjectSwizzler *)gul_objectSwizzler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzler.h new file mode 100644 index 000000000..26949c886 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULSwizzler.h @@ -0,0 +1,71 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This class handles the runtime manipulation necessary to instrument selectors. It stores the + * classes and selectors that have been swizzled, and runs all operations on its own queue. + */ +@interface GULSwizzler : NSObject + +/** Manipulates the Objective-C runtime to replace the original IMP with the supplied block. + * + * @param aClass The class to swizzle. + * @param selector The selector of the class to swizzle. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @param block The block that replaces the original IMP. + */ ++ (void)swizzleClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector + withBlock:(nullable id)block; + +/** Returns the current IMP for the given class and selector. + * + * @param aClass The class to use. + * @param selector The selector to find the implementation of. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return The implementation of the selector in the runtime. + */ ++ (nullable IMP)currentImplementationForClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector; + +/** Checks the runtime to see if a selector exists on a class. If a property is declared as + * @dynamic, we have a reverse swizzling situation, where the implementation of a method exists + * only in concrete subclasses, and NOT in the superclass. We can detect that situation using + * this helper method. Similarly, we can detect situations where a class doesn't implement a + * protocol method. + * + * @param selector The selector to check for. + * @param aClass The class to check. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return YES if the method was found in this selector/class combination, NO otherwise. + */ ++ (BOOL)selector:(SEL)selector existsInClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Returns a list of all Objective-C (and not primitive) ivars contained by the given object. + * + * @param object The object whose ivars will be iterated. + * @return The list of ivar objects. + */ ++ (NSArray *)ivarObjectsForObject:(id)object; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..eb2e472f1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,41 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULObjectSwizzler.h" +#import "GULSwizzledObject.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULOriginalIMPConvenienceMacros.h" +#import "GULSwizzler.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-arm64_i386_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..d61427bf2 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULObjectSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULObjectSwizzler.h new file mode 100644 index 000000000..b0a692a33 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULObjectSwizzler.h @@ -0,0 +1,123 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Enums that map to their OBJC-prefixed counterparts. */ +typedef OBJC_ENUM(uintptr_t, GUL_ASSOCIATION){ + + // Is a weak association. + GUL_ASSOCIATION_ASSIGN, + + // Is a nonatomic strong association. + GUL_ASSOCIATION_RETAIN_NONATOMIC, + + // Is a nonatomic copy association. + GUL_ASSOCIATION_COPY_NONATOMIC, + + // Is an atomic strong association. + GUL_ASSOCIATION_RETAIN, + + // Is an atomic copy association. + GUL_ASSOCIATION_COPY}; + +/** This class handles swizzling a specific instance of a class by generating a + * dynamic subclass and installing selectors and properties onto the dynamic + * subclass. Then, the instance's class is set to the dynamic subclass. There + * should be a 1:1 ratio of object swizzlers to swizzled instances. + */ +@interface GULObjectSwizzler : NSObject + +/** The subclass that is generated. */ +@property(nullable, nonatomic, readonly) Class generatedClass; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ ++ (void)setAssociatedObject:(id)object + key:(NSString *)key + value:(nullable id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param object The object that will be queried for the associated object. + * @param key The key of the associated object. + */ ++ (nullable id)getAssociatedObject:(id)object key:(NSString *)key; + +/** Please use the designated initializer. */ +- (instancetype)init NS_UNAVAILABLE; + +/** Instantiates an object swizzler using an object it will operate on. + * Generates a new class pair. + * + * @note There is no need to store this object. After calling -swizzle, this + * object can be found by calling -gul_objectSwizzler + * + * @param object The object to be swizzled. + * @return An instance of this class. + */ +- (instancetype)initWithObject:(id)object NS_DESIGNATED_INITIALIZER; + +/** Sets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + * @param value The value to associate to the swizzled object. + * @param association The mechanism to use when associating the objects. + */ +- (void)setAssociatedObjectWithKey:(NSString *)key + value:(id)value + association:(GUL_ASSOCIATION)association; + +/** Gets an associated object in the runtime. This mechanism can be used to + * simulate adding properties. + * + * @param key The key of the associated object. + */ +- (nullable id)getAssociatedObjectForKey:(NSString *)key; + +/** Copies a selector from an existing class onto the generated dynamic subclass + * that this object will adopt. This mechanism can be used to add methods to + * specific instances of a class. + * + * @note Should not be called after calling -swizzle. + * @param selector The selector to add to the instance. + * @param aClass The class supplying an implementation of the method. + * @param isClassSelector A BOOL specifying whether the selector is a class or + * instance selector. + */ +- (void)copySelector:(SEL)selector fromClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Swizzles the object, changing its class to the generated class. Registers + * the class pair. */ +- (void)swizzle; + +/** @return The value of -[objectBeingSwizzled isProxy] */ +- (BOOL)isSwizzlingProxyObject; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h new file mode 100644 index 000000000..a33262af0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULOriginalIMPConvenienceMacros.h @@ -0,0 +1,207 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * GULOriginalIMPConvenienceMacros.h + * + * This header contains convenience macros for invoking the original IMP of a swizzled method. + */ + +/** + * Invokes original IMP when the original selector takes no arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + */ +#define GUL_INVOKE_ORIGINAL_IMP0(__receivingObject, __swizzledSEL, __returnType, __originalIMP) \ + ((__returnType(*)(id, SEL))__originalIMP)(__receivingObject, __swizzledSEL) + +/** + * Invokes original IMP when the original selector takes 1 argument. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP1(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1)))__originalIMP)(__receivingObject, __swizzledSEL, \ + __arg1) + +/** + * Invokes original IMP when the original selector takes 2 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP2(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2) + +/** + * Invokes original IMP when the original selector takes 3 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP3(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), \ + __typeof__(__arg3)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3) + +/** + * Invokes original IMP when the original selector takes 4 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP4(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4)))__originalIMP)(__receivingObject, __swizzledSEL, __arg1, \ + __arg2, __arg3, __arg4) + +/** + * Invokes original IMP when the original selector takes 5 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP5(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5) + +/** + * Invokes original IMP when the original selector takes 6 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP6(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) + +/** + * Invokes original IMP when the original selector takes 7 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP7(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) + +/** + * Invokes original IMP when the original selector takes 8 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP8(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8) + +/** + * Invokes original IMP when the original selector takes 9 arguments. + * + * @param __receivingObject The object on which the IMP is invoked. + * @param __swizzledSEL The selector used for swizzling. + * @param __returnType The return type of the original implementation. + * @param __originalIMP The original IMP. + * @param __arg1 The first argument. + * @param __arg2 The second argument. + * @param __arg3 The third argument. + * @param __arg4 The fourth argument. + * @param __arg5 The fifth argument. + * @param __arg6 The sixth argument. + * @param __arg7 The seventh argument. + * @param __arg8 The eighth argument. + * @param __arg9 The ninth argument. + */ +#define GUL_INVOKE_ORIGINAL_IMP9(__receivingObject, __swizzledSEL, __returnType, __originalIMP, \ + __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, __arg8, \ + __arg9) \ + ((__returnType(*)(id, SEL, __typeof__(__arg1), __typeof__(__arg2), __typeof__(__arg3), \ + __typeof__(__arg4), __typeof__(__arg5), __typeof__(__arg6), \ + __typeof__(__arg7), __typeof__(__arg8), __typeof__(__arg9)))__originalIMP)( \ + __receivingObject, __swizzledSEL, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7, \ + __arg8, __arg9) diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzledObject.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzledObject.h new file mode 100644 index 000000000..314ceecdf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzledObject.h @@ -0,0 +1,44 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class GULObjectSwizzler; + +FOUNDATION_EXPORT NSString *kSwizzlerAssociatedObjectKey; + +/** This class exists as a method donor. These methods will be added to all objects that are + * swizzled by the object swizzler. This class should not be instantiated. + */ +@interface GULSwizzledObject : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Copies the methods below to the swizzled object. + * + * @param objectSwizzler The swizzler to use when adding the methods below. + */ ++ (void)copyDonorSelectorsUsingObjectSwizzler:(GULObjectSwizzler *)objectSwizzler; + +#pragma mark - Donor methods. + +/** @return The generated subclass. Used in respondsToSelector: calls. */ +- (Class)gul_class; + +/** @return The object swizzler that manages this object. */ +- (GULObjectSwizzler *)gul_objectSwizzler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzler.h new file mode 100644 index 000000000..26949c886 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULSwizzler.h @@ -0,0 +1,71 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This class handles the runtime manipulation necessary to instrument selectors. It stores the + * classes and selectors that have been swizzled, and runs all operations on its own queue. + */ +@interface GULSwizzler : NSObject + +/** Manipulates the Objective-C runtime to replace the original IMP with the supplied block. + * + * @param aClass The class to swizzle. + * @param selector The selector of the class to swizzle. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @param block The block that replaces the original IMP. + */ ++ (void)swizzleClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector + withBlock:(nullable id)block; + +/** Returns the current IMP for the given class and selector. + * + * @param aClass The class to use. + * @param selector The selector to find the implementation of. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return The implementation of the selector in the runtime. + */ ++ (nullable IMP)currentImplementationForClass:(Class)aClass + selector:(SEL)selector + isClassSelector:(BOOL)isClassSelector; + +/** Checks the runtime to see if a selector exists on a class. If a property is declared as + * @dynamic, we have a reverse swizzling situation, where the implementation of a method exists + * only in concrete subclasses, and NOT in the superclass. We can detect that situation using + * this helper method. Similarly, we can detect situations where a class doesn't implement a + * protocol method. + * + * @param selector The selector to check for. + * @param aClass The class to check. + * @param isClassSelector A BOOL specifying whether the selector is a class or instance selector. + * @return YES if the method was found in this selector/class combination, NO otherwise. + */ ++ (BOOL)selector:(SEL)selector existsInClass:(Class)aClass isClassSelector:(BOOL)isClassSelector; + +/** Returns a list of all Objective-C (and not primitive) ivars contained by the given object. + * + * @param object The object whose ivars will be iterated. + * @return The list of ivar objects. + */ ++ (NSArray *)ivarObjectsForObject:(id)object; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..eb2e472f1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,41 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULObjectSwizzler.h" +#import "GULSwizzledObject.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULOriginalIMPConvenienceMacros.h" +#import "GULSwizzler.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/ios-x86_64-maccatalyst/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..854e78639 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..68d94bac6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,37 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/macos-x86_64/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..4ef1efdc0 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..d1ce1fc38 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,37 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities new file mode 100644 index 000000000..f95c4e2e9 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/GoogleUtilities differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h new file mode 100644 index 000000000..58dec4927 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppDelegateSwizzler.h @@ -0,0 +1,107 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULApplication.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULAppDelegateInterceptorID; + +/** This class contains methods that isa swizzle the app delegate. */ +@interface GULAppDelegateSwizzler : NSProxy + +/** Registers an app delegate interceptor whose methods will be invoked as they're invoked on the + * original app delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULAppDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULAppDelegateInterceptorID)registerAppDelegateInterceptor: + (id)interceptor; + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterAppDelegateInterceptorWithID:(GULAppDelegateInterceptorID)interceptorID; + +/** This method ensures that the original app delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the app delegate once). + * + * This method doesn't proxy APNS related methods: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * To proxy these methods use +[GULAppDelegateSwizzler + * proxyOriginalDelegateIncludingAPNSMethods]. The methods have to be proxied separately to + * avoid potential warnings from Apple review about missing Push Notification Entitlement (e.g. + * https://github.com/firebase/firebase-ios-sdk/issues/2807) + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegateIncludingAPNSMethods + */ ++ (void)proxyOriginalDelegate; + +/** This method ensures that the original app delegate has been proxied including APNS related + * methods. Call this before registering your interceptor. This method is safe to call multiple + * times (but it only proxies the app delegate once) or + * after +[GULAppDelegateSwizzler proxyOriginalDelegate] + * + * This method calls +[GULAppDelegateSwizzler proxyOriginalDelegate] under the hood. + * After calling this method the following App Delegate methods will be proxied in addition to + * the methods proxied by proxyOriginalDelegate: + * @code + * - application:didRegisterForRemoteNotificationsWithDeviceToken: + * - application:didFailToRegisterForRemoteNotificationsWithError: + * - application:didReceiveRemoteNotification:fetchCompletionHandler: + * - application:didReceiveRemoteNotification: + * @endcode + * + * The method has no effect for extensions. + * + * @see proxyOriginalDelegate + */ ++ (void)proxyOriginalDelegateIncludingAPNSMethods; + +/** Indicates whether app delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if AppDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isAppDelegateProxyEnabled; + +/** Returns the current sharedApplication. + * + * @return the current application instance if in an app, or nil if in extension or if it doesn't + * exist. + */ ++ (nullable GULApplication *)sharedApplication; + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +NS_ASSUME_NONNULL_END + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h new file mode 100644 index 000000000..d2bb935b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULAppEnvironmentUtil.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (nullable NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +/// @return YES if Swift runtime detected in the app. ++ (BOOL)hasSwiftRuntime; + +/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst". ++ (NSString *)applePlatform; + +/// @return The way the library was added to the app, e.g. "swiftpm", "cocoapods", etc. ++ (NSString *)deploymentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h new file mode 100644 index 000000000..80672124a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULApplication.h @@ -0,0 +1,50 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +#define GULApplication UIApplication +#define GULApplicationDelegate UIApplicationDelegate +#define GULUserActivityRestoring UIUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"UIApplication"; + +#elif TARGET_OS_OSX + +#import + +#define GULApplication NSApplication +#define GULApplicationDelegate NSApplicationDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"NSApplication"; + +#elif TARGET_OS_WATCH + +#import + +// We match the according watchOS API but swizzling should not work in watch +#define GULApplication WKExtension +#define GULApplicationDelegate WKExtensionDelegate +#define GULUserActivityRestoring NSUserActivityRestoring + +static NSString *const kGULApplicationClassName = @"WKExtension"; + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h new file mode 100644 index 000000000..9432dfc04 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h new file mode 100644 index 000000000..dc01a8368 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h new file mode 100644 index 000000000..de4bef2fb --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h new file mode 100644 index 000000000..6797399b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLogger.h @@ -0,0 +1,159 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULLoggerLevel.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(NSString *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h new file mode 100644 index 000000000..f0ee435b8 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULLoggerLevel.h @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** + * The log levels used by internal logging. + */ +typedef NS_ENUM(NSInteger, GULLoggerLevel) { + /** Error level, matches ASL_LEVEL_ERR. */ + GULLoggerLevelError = 3, + /** Warning level, matches ASL_LEVEL_WARNING. */ + GULLoggerLevelWarning = 4, + /** Notice level, matches ASL_LEVEL_NOTICE. */ + GULLoggerLevelNotice = 5, + /** Info level, matches ASL_LEVEL_INFO. */ + GULLoggerLevelInfo = 6, + /** Debug level, matches ASL_LEVEL_DEBUG. */ + GULLoggerLevelDebug = 7, + /** Minimum log level. */ + GULLoggerLevelMin = GULLoggerLevelError, + /** Maximum log level. */ + GULLoggerLevelMax = GULLoggerLevelDebug +} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h new file mode 100644 index 000000000..a8cc45b4b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULMutableDictionary.h @@ -0,0 +1,46 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// A mutable dictionary that provides atomic accessor and mutators. +@interface GULMutableDictionary : NSObject + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKey:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)object forKey:(id)key; + +/// Removes the object given its session ID from the dictionary. +- (void)removeObjectForKey:(id)key; + +/// Removes all objects. +- (void)removeAllObjects; + +/// Returns the number of current objects in the dictionary. +- (NSUInteger)count; + +/// Returns an object given a key in the dictionary or nil if not found. +- (id)objectForKeyedSubscript:(id)key; + +/// Updates the object given its key or adds it to the dictionary if it is not in the dictionary. +- (void)setObject:(id)obj forKeyedSubscript:(id)key; + +/// Returns the immutable dictionary. +- (NSDictionary *)dictionary; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h new file mode 100644 index 000000000..36f94a709 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNSData+zlib.h @@ -0,0 +1,49 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. + +// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given +// such data. To handle data of that size you really should be streaming it rather then doing it all +// in memory. + +@interface NSData (GULGzip) + +/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must +/// be a gzipped payloads. ++ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; + +/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default +/// compression level. ++ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; + +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; +FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber +FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber + +typedef NS_ENUM(NSInteger, GULNSDataZlibError) { + GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, + // An internal zlib error. + // GULNSDataZlibErrorKey will contain the error value. + // NSLocalizedDescriptionKey may contain an error string from zlib. + // Look in zlib.h for list of errors. + GULNSDataZlibErrorInternal, + // There was left over data in the buffer that was not used. + // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. + GULNSDataZlibErrorDataRemaining +}; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h new file mode 100644 index 000000000..0e75ae5d7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetwork.h @@ -0,0 +1,87 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkURLSession.h" + +/// Delegate protocol for GULNetwork events. +@protocol GULNetworkReachabilityDelegate + +/// Tells the delegate to handle events when the network reachability changes to connected or not +/// connected. +- (void)reachabilityDidChange; + +@end + +/// The Network component that provides network status and handles network requests and responses. +/// This is not thread safe. +/// +/// NOTE: +/// User must add FIRAnalytics handleEventsForBackgroundURLSessionID:completionHandler to the +/// AppDelegate application:handleEventsForBackgroundURLSession:completionHandler: +@interface GULNetwork : NSObject + +/// Indicates if network connectivity is available. +@property(nonatomic, readonly, getter=isNetworkConnected) BOOL networkConnected; + +/// Indicates if there are any uploads in progress. +@property(nonatomic, readonly, getter=hasUploadInProgress) BOOL uploadInProgress; + +/// An optional delegate that can be used in the event when network reachability changes. +@property(nonatomic, weak) id reachabilityDelegate; + +/// An optional delegate that can be used to log messages, warnings or errors that occur in the +/// network operations. +@property(nonatomic, weak) id loggerDelegate; + +/// Indicates whether the logger should display debug messages. +@property(nonatomic, assign) BOOL isDebugModeEnabled; + +/// The time interval in seconds for the network request to timeout. +@property(nonatomic, assign) NSTimeInterval timeoutInterval; + +/// Initializes with the default reachability host. +- (instancetype)init; + +/// Initializes with a custom reachability host. +- (instancetype)initWithReachabilityHost:(NSString *)reachabilityHost; + +/// Handles events when background session with the given ID has finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Compresses and sends a POST request with the provided data to the URL. The session will be +/// background session if usingBackgroundSession is YES. Otherwise, the POST session is default +/// session. Returns a session ID or nil if an error occurs. +- (NSString *)postURL:(NSURL *)url + payload:(NSData *)payload + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +/// Sends a GET request with the provided data to the URL. The session will be background session +/// if usingBackgroundSession is YES. Otherwise, the GET session is default session. Returns a +/// session ID or nil if an error occurs. +- (NSString *)getURL:(NSURL *)url + headers:(NSDictionary *)headers + queue:(dispatch_queue_t)queue + usingBackgroundSession:(BOOL)usingBackgroundSession + completionHandler:(GULNetworkCompletionHandler)handler; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h new file mode 100644 index 000000000..1cbedd1b7 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkConstants.h @@ -0,0 +1,71 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/// Error codes in Firebase Network error domain. +/// Note: these error codes should never change. It would make it harder to decode the errors if +/// we inadvertently altered any of these codes in a future SDK version. +typedef NS_ENUM(NSInteger, GULNetworkErrorCode) { + /// Unknown error. + GULNetworkErrorCodeUnknown = 0, + /// Error occurs when the request URL is invalid. + GULErrorCodeNetworkInvalidURL = 1, + /// Error occurs when request cannot be constructed. + GULErrorCodeNetworkRequestCreation = 2, + /// Error occurs when payload cannot be compressed. + GULErrorCodeNetworkPayloadCompression = 3, + /// Error occurs when session task cannot be created. + GULErrorCodeNetworkSessionTaskCreation = 4, + /// Error occurs when there is no response. + GULErrorCodeNetworkInvalidResponse = 5 +}; + +#pragma mark - Network constants + +/// The prefix of the ID of the background session. +extern NSString *const kGULNetworkBackgroundSessionConfigIDPrefix; + +/// The sub directory to store the files of data that is being uploaded in the background. +extern NSString *const kGULNetworkApplicationSupportSubdirectory; + +/// Name of the temporary directory that stores files for background uploading. +extern NSString *const kGULNetworkTempDirectoryName; + +/// The period when the temporary uploading file can stay. +extern const NSTimeInterval kGULNetworkTempFolderExpireTime; + +/// The default network request timeout interval. +extern const NSTimeInterval kGULNetworkTimeOutInterval; + +/// The host to check the reachability of the network. +extern NSString *const kGULNetworkReachabilityHost; + +/// The key to get the error context of the UserInfo. +extern NSString *const kGULNetworkErrorContext; + +#pragma mark - Network Status Code + +extern const int kGULNetworkHTTPStatusOK; +extern const int kGULNetworkHTTPStatusNoContent; +extern const int kGULNetworkHTTPStatusCodeMultipleChoices; +extern const int kGULNetworkHTTPStatusCodeMovedPermanently; +extern const int kGULNetworkHTTPStatusCodeFound; +extern const int kGULNetworkHTTPStatusCodeNotModified; +extern const int kGULNetworkHTTPStatusCodeMovedTemporarily; +extern const int kGULNetworkHTTPStatusCodeNotFound; +extern const int kGULNetworkHTTPStatusCodeCannotAcceptTraffic; +extern const int kGULNetworkHTTPStatusCodeUnavailable; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h new file mode 100644 index 000000000..425c07319 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkLoggerProtocol.h @@ -0,0 +1,49 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkMessageCode.h" + +/// The log levels used by GULNetworkLogger. +typedef NS_ENUM(NSInteger, GULNetworkLogLevel) { + kGULNetworkLogLevelError = 3, + kGULNetworkLogLevelWarning = 4, + kGULNetworkLogLevelInfo = 6, + kGULNetworkLogLevelDebug = 7, +}; + +@protocol GULNetworkLoggerDelegate + +@required +/// Tells the delegate to log a message with an array of contexts and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + contexts:(NSArray *)contexts; + +/// Tells the delegate to log a message with a context and the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message + context:(id)context; + +/// Tells the delegate to log a message with the log level. +- (void)GULNetwork_logWithLevel:(GULNetworkLogLevel)logLevel + messageCode:(GULNetworkMessageCode)messageCode + message:(NSString *)message; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h new file mode 100644 index 000000000..507bc5a5d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkMessageCode.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Make sure these codes do not overlap with any contained in the FIRAMessageCode enum. +typedef NS_ENUM(NSInteger, GULNetworkMessageCode) { + // GULNetwork.m + kGULNetworkMessageCodeNetwork000 = 900000, // I-NET900000 + kGULNetworkMessageCodeNetwork001 = 900001, // I-NET900001 + kGULNetworkMessageCodeNetwork002 = 900002, // I-NET900002 + kGULNetworkMessageCodeNetwork003 = 900003, // I-NET900003 + // GULNetworkURLSession.m + kGULNetworkMessageCodeURLSession000 = 901000, // I-NET901000 + kGULNetworkMessageCodeURLSession001 = 901001, // I-NET901001 + kGULNetworkMessageCodeURLSession002 = 901002, // I-NET901002 + kGULNetworkMessageCodeURLSession003 = 901003, // I-NET901003 + kGULNetworkMessageCodeURLSession004 = 901004, // I-NET901004 + kGULNetworkMessageCodeURLSession005 = 901005, // I-NET901005 + kGULNetworkMessageCodeURLSession006 = 901006, // I-NET901006 + kGULNetworkMessageCodeURLSession007 = 901007, // I-NET901007 + kGULNetworkMessageCodeURLSession008 = 901008, // I-NET901008 + kGULNetworkMessageCodeURLSession009 = 901009, // I-NET901009 + kGULNetworkMessageCodeURLSession010 = 901010, // I-NET901010 + kGULNetworkMessageCodeURLSession011 = 901011, // I-NET901011 + kGULNetworkMessageCodeURLSession012 = 901012, // I-NET901012 + kGULNetworkMessageCodeURLSession013 = 901013, // I-NET901013 + kGULNetworkMessageCodeURLSession014 = 901014, // I-NET901014 + kGULNetworkMessageCodeURLSession015 = 901015, // I-NET901015 + kGULNetworkMessageCodeURLSession016 = 901016, // I-NET901016 + kGULNetworkMessageCodeURLSession017 = 901017, // I-NET901017 + kGULNetworkMessageCodeURLSession018 = 901018, // I-NET901018 + kGULNetworkMessageCodeURLSession019 = 901019, // I-NET901019 +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h new file mode 100644 index 000000000..3f9f7f9e1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULNetworkURLSession.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "GULNetworkLoggerProtocol.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^GULNetworkCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSError *_Nullable error); +typedef void (^GULNetworkURLSessionCompletionHandler)(NSHTTPURLResponse *_Nullable response, + NSData *_Nullable data, + NSString *sessionID, + NSError *_Nullable error); +typedef void (^GULNetworkSystemCompletionHandler)(void); + +/// The protocol that uses NSURLSession for iOS >= 7.0 to handle requests and responses. +@interface GULNetworkURLSession : NSObject + +/// Indicates whether the background network is enabled. Default value is NO. +@property(nonatomic, getter=isBackgroundNetworkEnabled) BOOL backgroundNetworkEnabled; + +/// The logger delegate to log message, errors or warnings that occur during the network operations. +@property(nonatomic, weak, nullable) id loggerDelegate; + +/// Calls the system provided completion handler after the background session is finished. ++ (void)handleEventsForBackgroundURLSessionID:(NSString *)sessionID + completionHandler:(GULNetworkSystemCompletionHandler)completionHandler; + +/// Initializes with logger delegate. +- (instancetype)initWithNetworkLoggerDelegate: + (nullable id)networkLoggerDelegate NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/// Sends an asynchronous POST request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session/connection. +- (nullable NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +/// Sends an asynchronous GET request and calls the provided completion handler when the request +/// completes or when errors occur, and returns an ID of the session. +- (nullable NSString *)sessionIDFromAsyncGETRequest:(NSURLRequest *)request + completionHandler:(GULNetworkURLSessionCompletionHandler)handler; + +NS_ASSUME_NONNULL_END +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h new file mode 100644 index 000000000..0c70c0553 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULReachabilityChecker.h @@ -0,0 +1,79 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#if !TARGET_OS_WATCH +#import +#endif + +/// Reachability Status +typedef enum { + kGULReachabilityUnknown, ///< Have not yet checked or been notified whether host is reachable. + kGULReachabilityNotReachable, ///< Host is not reachable. + kGULReachabilityViaWifi, ///< Host is reachable via Wifi. + kGULReachabilityViaCellular, ///< Host is reachable via cellular. +} GULReachabilityStatus; + +const NSString *GULReachabilityStatusString(GULReachabilityStatus status); + +@class GULReachabilityChecker; + +/// Google Analytics iOS Reachability Checker. +@protocol GULReachabilityDelegate +@required +/// Called when network status has changed. +- (void)reachability:(GULReachabilityChecker *)reachability + statusChanged:(GULReachabilityStatus)status; +@end + +/// Google Analytics iOS Network Status Checker. +@interface GULReachabilityChecker : NSObject + +/// The last known reachability status, or GULReachabilityStatusUnknown if the +/// checker is not active. +@property(nonatomic, readonly) GULReachabilityStatus reachabilityStatus; +/// The host to which reachability status is to be checked. +@property(nonatomic, copy, readonly) NSString *host; +/// The delegate to be notified of reachability status changes. +@property(nonatomic, weak) id reachabilityDelegate; +/// `YES` if the reachability checker is active, `NO` otherwise. +@property(nonatomic, readonly) BOOL isActive; + +/// Initialize the reachability checker. Note that you must call start to begin checking for and +/// receiving notifications about network status changes. +/// +/// @param reachabilityDelegate The delegate to be notified when reachability status to host +/// changes. +/// +/// @param host The name of the host. +/// +- (instancetype)initWithReachabilityDelegate:(id)reachabilityDelegate + withHost:(NSString *)host; + +- (instancetype)init NS_UNAVAILABLE; + +/// Start checking for reachability to the specified host. This has no effect if the status +/// checker is already checking for connectivity. +/// +/// @return `YES` if initiating status checking was successful or the status checking has already +/// been initiated, `NO` otherwise. +- (BOOL)start; + +/// Stop checking for reachability to the specified host. This has no effect if the status +/// checker is not checking for connectivity. +- (void)stop; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h new file mode 100644 index 000000000..ed080a397 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSceneDelegateSwizzler.h @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +#if !TARGET_OS_OSX +#import +#endif // !TARGET_OS_OSX + +#if ((TARGET_OS_IOS || TARGET_OS_TV) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)) +#define UISCENE_SUPPORTED 1 +#endif + +NS_ASSUME_NONNULL_BEGIN + +typedef NSString *const GULSceneDelegateInterceptorID; + +/** This class contains methods that isa swizzle the scene delegate. */ +@interface GULSceneDelegateSwizzler : NSProxy + +#if UISCENE_SUPPORTED + +/** Registers a scene delegate interceptor whose methods will be invoked as they're invoked on the + * original scene delegate. + * + * @param interceptor An instance of a class that conforms to the application delegate protocol. + * The interceptor is NOT retained. + * @return A unique GULSceneDelegateInterceptorID if interceptor was successfully registered; nil + * if it fails. + */ ++ (nullable GULSceneDelegateInterceptorID)registerSceneDelegateInterceptor: + (id)interceptor API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Unregisters an interceptor with the given ID if it exists. + * + * @param interceptorID The object that was generated when the interceptor was registered. + */ ++ (void)unregisterSceneDelegateInterceptorWithID:(GULSceneDelegateInterceptorID)interceptorID + API_AVAILABLE(ios(13.0), tvos(13.0)); + +/** Do not initialize this class. */ +- (instancetype)init NS_UNAVAILABLE; + +#endif // UISCENE_SUPPORTED + +/** This method ensures that the original scene delegate has been proxied. Call this before + * registering your interceptor. This method is safe to call multiple times (but it only proxies + * the scene delegate once). + * + * The method has no effect for extensions. + */ ++ (void)proxyOriginalSceneDelegate; + +/** Indicates whether scene delegate proxy is explicitly disabled or enabled. Enabled by default. + * + * @return YES if SceneDelegateProxy is Enabled, NO otherwise. + */ ++ (BOOL)isSceneDelegateProxyEnabled; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h new file mode 100644 index 000000000..8484b3953 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h new file mode 100644 index 000000000..e88eb67ba --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULURLSessionDataResponse.h @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class represents HTTP response received from `NSURLSession`. */ +@interface GULURLSessionDataResponse : NSObject + +@property(nonatomic, readonly) NSHTTPURLResponse *HTTPResponse; +@property(nonatomic, nullable, readonly) NSData *HTTPBody; + +- (instancetype)initWithResponse:(NSHTTPURLResponse *)response HTTPBody:(nullable NSData *)body; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h new file mode 100644 index 000000000..0d0478184 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h new file mode 100644 index 000000000..d1ce1fc38 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/GoogleUtilities-umbrella.h @@ -0,0 +1,37 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "GULAppDelegateSwizzler.h" +#import "GULApplication.h" +#import "GULSceneDelegateSwizzler.h" +#import "GULAppEnvironmentUtil.h" +#import "GULHeartbeatDateStorage.h" +#import "GULKeychainStorage.h" +#import "GULKeychainUtils.h" +#import "GULSecureCoding.h" +#import "GULURLSessionDataResponse.h" +#import "NSURLSession+GULPromises.h" +#import "GULLogger.h" +#import "GULLoggerLevel.h" +#import "GULNSData+zlib.h" +#import "GULMutableDictionary.h" +#import "GULNetwork.h" +#import "GULNetworkConstants.h" +#import "GULNetworkLoggerProtocol.h" +#import "GULNetworkMessageCode.h" +#import "GULNetworkURLSession.h" +#import "GULReachabilityChecker.h" +#import "GULUserDefaults.h" + +FOUNDATION_EXPORT double GoogleUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char GoogleUtilitiesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h new file mode 100644 index 000000000..7bed005ea --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Headers/NSURLSession+GULPromises.h @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; +@class GULURLSessionDataResponse; + +NS_ASSUME_NONNULL_BEGIN + +/** Promise based API for `NSURLSession`. */ +@interface NSURLSession (GULPromises) + +/** Creates a promise wrapping `-[NSURLSession dataTaskWithRequest:completionHandler:]` method. + * @param URLRequest The request to create a data task with. + * @return A promise that is fulfilled when an HTTP response is received (with any response code), + * or is rejected with the error passed to the task completion. + */ +- (FBLPromise *)gul_dataTaskPromiseWithRequest: + (NSURLRequest *)URLRequest; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Info.plist new file mode 100644 index 000000000..b541bc2c5 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + GoogleUtilities + CFBundleIdentifier + com.firebase.Firebase-GoogleUtilities + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + GoogleUtilities + CFBundlePackageType + FMWK + CFBundleVersion + 7.2.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap new file mode 100644 index 000000000..29a2d1d23 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/GoogleUtilities.xcframework/tvos-arm64_x86_64-simulator/GoogleUtilities.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module GoogleUtilities { +umbrella header "GoogleUtilities-umbrella.h" +export * +module * { export * } + link framework "Security" + link framework "SystemConfiguration" + link "z" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/Info.plist new file mode 100644 index 000000000..28d0b5b3b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/Info.plist @@ -0,0 +1,95 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-x86_64-maccatalyst + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + tvos-arm64 + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + tvos + + + LibraryIdentifier + macos-x86_64 + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + macos + + + LibraryIdentifier + tvos-arm64_x86_64-simulator + LibraryPath + PromisesObjC.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + tvos + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..5b014a8b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..48610530e Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_armv7/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..5b014a8b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..207396287 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-arm64_i386_x86_64-simulator/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..5b014a8b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..67f25d1b9 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/ios-x86_64-maccatalyst/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/Headers b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/Headers new file mode 120000 index 000000000..d5ab97c5c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/Headers @@ -0,0 +1 @@ +Versions/A/Headers \ No newline at end of file diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..7447f7c90 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..a0264d1d4 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/macos-x86_64/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..5b014a8b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..d864ffa42 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h new file mode 100644 index 000000000..9c0090e24 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+All.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AllAdditions) + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)all:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until all of the given promises are fulfilled. + If one of the given promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected FBLPromise correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of an array containing the values of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + all:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `all` operators. + Usage: FBLPromise.all(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AllAdditions) + ++ (FBLPromise * (^)(NSArray *))all FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))allOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h new file mode 100644 index 000000000..13000f5b4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Always.h @@ -0,0 +1,54 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AlwaysAdditions) + +typedef void (^FBLPromiseAlwaysWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)always:(FBLPromiseAlwaysWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to dispatch on. + @param work A block that always executes, no matter if the receiver is rejected or fulfilled. + @return A new pending promise to be resolved with same resolution as the receiver. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + always:(FBLPromiseAlwaysWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `always` operators. + Usage: promise.always(^{...}) + */ +@interface FBLPromise(DotSyntax_AlwaysAdditions) + +- (FBLPromise* (^)(FBLPromiseAlwaysWorkBlock))always FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAlwaysWorkBlock))alwaysOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h new file mode 100644 index 000000000..82875bf77 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Any.h @@ -0,0 +1,69 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AnyAdditions) + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSErrors`, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)any:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Waits until all of the given promises are either fulfilled or rejected. + If all promises are rejected, then the returned promise is rejected with same error + as the last one rejected. + If at least one of the promises is fulfilled, the resulting promise is fulfilled with an array of + values or `NSError`s, matching the original order of fulfilled or rejected promises respectively. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + Promises resolved with `nil` become `NSNull` instances in the resulting array. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return Promise of array containing the values or `NSError`s of input promises in the same order. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + any:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `any` operators. + Usage: FBLPromise.any(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_AnyAdditions) + ++ (FBLPromise * (^)(NSArray *))any FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))anyOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h new file mode 100644 index 000000000..0588a9eaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Async.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(AsyncAdditions) + +typedef void (^FBLPromiseFulfillBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseRejectBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseAsyncWorkBlock)(FBLPromiseFulfillBlock fulfill, + FBLPromiseRejectBlock reject) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)async:(FBLPromiseAsyncWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + async:(FBLPromiseAsyncWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `async` operators. + Usage: FBLPromise.async(^(FBLPromiseFulfillBlock fulfill, FBLPromiseRejectBlock reject) { ... }) + */ +@interface FBLPromise(DotSyntax_AsyncAdditions) + ++ (FBLPromise* (^)(FBLPromiseAsyncWorkBlock))async FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, FBLPromiseAsyncWorkBlock))asyncOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h new file mode 100644 index 000000000..c97a1baf4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Await.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for promise resolution. The current thread blocks until the promise is resolved. + + @param promise Promise to wait for. + @param error Error the promise was rejected with, or `nil` if the promise was fulfilled. + @return Value the promise was fulfilled with. If the promise was rejected, the return value + is always `nil`, but the error out arg is not. + */ +FOUNDATION_EXTERN id __nullable FBLPromiseAwait(FBLPromise *promise, + NSError **error) NS_REFINED_FOR_SWIFT; + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h new file mode 100644 index 000000000..a9ff170fc --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Catch.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(CatchAdditions) + +typedef void (^FBLPromiseCatchWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously. + + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)catch:(FBLPromiseCatchWorkBlock)reject NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with same resolution as the receiver. + If receiver is rejected, then `reject` block is executed asynchronously on the given queue. + + @param queue A queue to invoke the `reject` block on. + @param reject A block to handle the error that receiver was rejected with. + @return A new pending promise. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + catch:(FBLPromiseCatchWorkBlock)reject NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `catch` operators. + Usage: promise.catch(^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_CatchAdditions) + +- (FBLPromise* (^)(FBLPromiseCatchWorkBlock))catch FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseCatchWorkBlock))catchOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h new file mode 100644 index 000000000..557df4850 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Delay.h @@ -0,0 +1,59 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DelayAdditions) + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)delay:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a new pending promise that fulfills with the same value as `self` after the `delay`, or + rejects with the same error immediately. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that fulfills at least `delay` seconds later than `self`, or rejects + with the same error immediately. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + delay:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `delay` operators. + Usage: promise.delay(...) + */ +@interface FBLPromise(DotSyntax_DelayAdditions) + +- (FBLPromise * (^)(NSTimeInterval))delay FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSTimeInterval))delayOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h new file mode 100644 index 000000000..6838e0adf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Do.h @@ -0,0 +1,55 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(DoAdditions) + +typedef id __nullable (^FBLPromiseDoWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously. + + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)do:(FBLPromiseDoWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise and executes `work` block asynchronously on the given queue. + + @param queue A queue to invoke the `work` block on. + @param work A block that returns a value or an error used to resolve the promise. + @return A new pending promise. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue do:(FBLPromiseDoWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `do` operators. + Usage: FBLPromise.doOn(queue, ^(NSError *error) { ... }) + */ +@interface FBLPromise(DotSyntax_DoAdditions) + ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseDoWorkBlock))doOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h new file mode 100644 index 000000000..2f67258de --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Race.h @@ -0,0 +1,62 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RaceAdditions) + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)race:(NSArray *)promises NS_SWIFT_UNAVAILABLE(""); + +/** + Wait until any of the given promises are fulfilled. + If one of the promises is rejected, then the returned promise is rejected with same error. + If any other arbitrary value or `NSError` appears in the array instead of `FBLPromise`, + it's implicitly considered a pre-fulfilled or pre-rejected `FBLPromise` correspondingly. + + @param queue A queue to dispatch on. + @param promises Promises to wait for. + @return A new pending promise to be resolved with the same resolution as the first promise, among + the given ones, which was resolved. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue race:(NSArray *)promises NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `race` operators. + Usage: FBLPromise.race(@[ ... ]) + */ +@interface FBLPromise(DotSyntax_RaceAdditions) + ++ (FBLPromise * (^)(NSArray *))race FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSArray *))raceOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h new file mode 100644 index 000000000..bb7df7ecf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Recover.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(RecoverAdditions) + +typedef id __nullable (^FBLPromiseRecoverWorkBlock)(NSError *error) NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)recover:(FBLPromiseRecoverWorkBlock)recovery NS_SWIFT_UNAVAILABLE(""); + +/** + Provides a new promise to recover in case the receiver gets rejected. + + @param queue A queue to dispatch on. + @param recovery A block to handle the error that the receiver was rejected with. + @return A new pending promise to use instead of the rejected one that gets resolved with resolution + returned from `recovery` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + recover:(FBLPromiseRecoverWorkBlock)recovery NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `recover` operators. + Usage: promise.recover(^id(NSError *error) {...}) + */ +@interface FBLPromise(DotSyntax_RecoverAdditions) + +- (FBLPromise * (^)(FBLPromiseRecoverWorkBlock))recover FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRecoverWorkBlock))recoverOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h new file mode 100644 index 000000000..5bb1eeee4 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Reduce.h @@ -0,0 +1,71 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ReduceAdditions) + +typedef id __nullable (^FBLPromiseReducerBlock)(Value __nullable partial, id next) + NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +/** + Sequentially reduces a collection of values to a single promise using a given combining block + and the value `self` resolves with as initial value. + + @param queue A queue to dispatch on. + @param items An array of values to process in order. + @param reducer A block to combine an accumulating value and an element of the sequence into + the new accumulating value or a promise resolved with it, to be used in the next + call of the `reducer` or returned to the caller. + @return A new pending promise returned from the last `reducer` invocation. + Or `self` if `items` is empty. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + reduce:(NSArray *)items + combine:(FBLPromiseReducerBlock)reducer NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `reduce` operators. + Usage: promise.reduce(values, ^id(id partial, id next) { ... }) + */ +@interface FBLPromise(DotSyntax_ReduceAdditions) + +- (FBLPromise * (^)(NSArray *, FBLPromiseReducerBlock))reduce FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, NSArray *, FBLPromiseReducerBlock))reduceOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h new file mode 100644 index 000000000..98ef558c0 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Retry.h @@ -0,0 +1,165 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** The default number of retry attempts is 1. */ +FOUNDATION_EXTERN NSInteger const FBLPromiseRetryDefaultAttemptsCount NS_REFINED_FOR_SWIFT; + +/** The default delay interval before making a retry attempt is 1.0 second. */ +FOUNDATION_EXTERN NSTimeInterval const FBLPromiseRetryDefaultDelayInterval NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(RetryAdditions) + +typedef id __nullable (^FBLPromiseRetryWorkBlock)(void) NS_SWIFT_UNAVAILABLE(""); +typedef BOOL (^FBLPromiseRetryPredicateBlock)(NSInteger, NSError *) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on rejection where the + `work` block is retried after a delay of `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. Defaults to `FBLPromiseRetryDefaultAttemptsCount` attempt(s) on + rejection where the `work` block is retried on the given `queue` after a delay of + `FBLPromiseRetryDefaultDelayInterval` second(s). + + @param queue A queue to invoke the `work` block on. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously, or rejects with the same error after all retry attempts have + been exhausted. On rejection, the `work` block is retried after the given delay `interval` and will + continue to retry until the number of specified attempts have been exhausted or will bail early if + the given condition is not met. + + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the default queue and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise that fulfills with the same value as the promise returned from `work` + block, which executes asynchronously on the given `queue`, or rejects with the same error after all + retry attempts have been exhausted. On rejection, the `work` block is retried after the given + delay `interval` and will continue to retry until the number of specified attempts have been + exhausted or will bail early if the given condition is not met. + + @param queue A queue to invoke the `work` block on. + @param count Max number of retry attempts. The `work` block will be executed once if the specified + count is less than or equal to zero. + @param interval Time to wait before the next retry attempt. + @param predicate Condition to check before the next retry attempt. The predicate block provides the + the number of remaining retry attempts and the error that the promise was rejected + with. + @param work A block that executes asynchronously on the given `queue` and returns a value or an + error used to resolve the promise. + @return A new pending promise that fulfills with the same value as the promise returned from `work` + block, or rejects with the same error after all retry attempts have been exhausted or if + the given condition is not met. + */ ++ (FBLPromise *)onQueue:(dispatch_queue_t)queue + attempts:(NSInteger)count + delay:(NSTimeInterval)interval + condition:(nullable FBLPromiseRetryPredicateBlock)predicate + retry:(FBLPromiseRetryWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise+Retry` operators. + Usage: FBLPromise.retry(^id { ... }) + */ +@interface FBLPromise(DotSyntax_RetryAdditions) + ++ (FBLPromise * (^)(FBLPromiseRetryWorkBlock))retry FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, FBLPromiseRetryWorkBlock))retryOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(NSInteger, NSTimeInterval, FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgain FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise * (^)(dispatch_queue_t, NSInteger, NSTimeInterval, + FBLPromiseRetryPredicateBlock __nullable, + FBLPromiseRetryWorkBlock))retryAgainOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h new file mode 100644 index 000000000..8478ae229 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Testing.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Waits for all scheduled promises blocks. + + @param timeout Maximum time to wait. + @return YES if all promises blocks have completed before the timeout and NO otherwise. + */ +FOUNDATION_EXTERN BOOL FBLWaitForPromisesWithTimeout(NSTimeInterval timeout) NS_REFINED_FOR_SWIFT; + +@interface FBLPromise(TestingAdditions) + +/** + Dispatch group for promises that is typically used to wait for all scheduled blocks. + */ +@property(class, nonatomic, readonly) dispatch_group_t dispatchGroup NS_REFINED_FOR_SWIFT; + +/** + Properties to get the current state of the promise. + */ +@property(nonatomic, readonly) BOOL isPending NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isFulfilled NS_REFINED_FOR_SWIFT; +@property(nonatomic, readonly) BOOL isRejected NS_REFINED_FOR_SWIFT; + +/** + Value the promise was fulfilled with. + Can be nil if the promise is still pending, was resolved with nil or after it has been rejected. + */ +@property(nonatomic, readonly, nullable) Value value NS_REFINED_FOR_SWIFT; + +/** + Error the promise was rejected with. + Can be nil if the promise is still pending or after it has been fulfilled. + */ +@property(nonatomic, readonly, nullable) NSError *error NS_REFINED_FOR_SWIFT; + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h new file mode 100644 index 000000000..32027e697 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Then.h @@ -0,0 +1,63 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ThenAdditions) + +typedef id __nullable (^FBLPromiseThenWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously only + when the receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with + the same error. + + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)then:(FBLPromiseThenWorkBlock)work NS_SWIFT_UNAVAILABLE(""); + +/** + Creates a pending promise which eventually gets resolved with resolution returned from `work` + block: either value, error or another promise. The `work` block is executed asynchronously when the + receiver is fulfilled. If receiver is rejected, the returned promise is also rejected with the same + error. + + @param queue A queue to invoke the `work` block on. + @param work A block to handle the value that receiver was fulfilled with. + @return A new pending promise to be resolved with resolution returned from the `work` block. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + then:(FBLPromiseThenWorkBlock)work NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `then` operators. + Usage: promise.then(^id(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ThenAdditions) + +- (FBLPromise* (^)(FBLPromiseThenWorkBlock))then FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, FBLPromiseThenWorkBlock))thenOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h new file mode 100644 index 000000000..184ba166f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Timeout.h @@ -0,0 +1,57 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(TimeoutAdditions) + +/** + Waits for a promise with the specified `timeout`. + + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)timeout:(NSTimeInterval)interval NS_SWIFT_UNAVAILABLE(""); + +/** + Waits for a promise with the specified `timeout`. + + @param queue A queue to dispatch on. + @param interval Time to wait in seconds. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeTimedOut` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + timeout:(NSTimeInterval)interval NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `timeout` operators. + Usage: promise.timeout(...) + */ +@interface FBLPromise(DotSyntax_TimeoutAdditions) + +- (FBLPromise* (^)(NSTimeInterval))timeout FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise* (^)(dispatch_queue_t, NSTimeInterval))timeoutOn FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h new file mode 100644 index 000000000..9dfa2f16a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Validate.h @@ -0,0 +1,60 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface FBLPromise(ValidateAdditions) + +typedef BOOL (^FBLPromiseValidateWorkBlock)(Value __nullable value) NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)validate:(FBLPromiseValidateWorkBlock)predicate NS_SWIFT_UNAVAILABLE(""); + +/** + Validates a fulfilled value or rejects the value if it can not be validated. + + @param queue A queue to dispatch on. + @param predicate An expression to validate. + @return A new pending promise that gets either resolved with same resolution as the receiver or + rejected with `FBLPromiseErrorCodeValidationFailure` error code in `FBLPromiseErrorDomain`. + */ +- (FBLPromise *)onQueue:(dispatch_queue_t)queue + validate:(FBLPromiseValidateWorkBlock)predicate NS_REFINED_FOR_SWIFT; + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `validate` operators. + Usage: promise.validate(^BOOL(id value) { ... }) + */ +@interface FBLPromise(DotSyntax_ValidateAdditions) + +- (FBLPromise * (^)(FBLPromiseValidateWorkBlock))validate FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); +- (FBLPromise * (^)(dispatch_queue_t, FBLPromiseValidateWorkBlock))validateOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h new file mode 100644 index 000000000..664e1bbff --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise+Wrap.h @@ -0,0 +1,316 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Different types of completion handlers available to be wrapped with promise. + */ +typedef void (^FBLPromiseCompletion)(void) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectCompletion)(id __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorCompletion)(NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseObjectOrErrorCompletion)(id __nullable, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseErrorOrObjectCompletion)(NSError* __nullable, id __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromise2ObjectsOrErrorCompletion)(id __nullable, id __nullable, + NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolCompletion)(BOOL) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseBoolOrErrorCompletion)(BOOL, NSError* __nullable) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerCompletion)(NSInteger) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseIntegerOrErrorCompletion)(NSInteger, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleCompletion)(double) NS_SWIFT_UNAVAILABLE(""); +typedef void (^FBLPromiseDoubleOrErrorCompletion)(double, NSError* __nullable) + NS_SWIFT_UNAVAILABLE(""); + +/** + Provides an easy way to convert methods that use common callback patterns into promises. + */ +@interface FBLPromise(WrapAdditions) + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)wrapCompletion:(void (^)(FBLPromiseCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with `nil` when completion handler is invoked. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapCompletion:(void (^)(FBLPromiseCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectCompletion:(void (^)(FBLPromiseObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error provided by completion handler. + If error is `nil`, fulfills with `nil`, otherwise rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorCompletion:(void (^)(FBLPromiseErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)wrapObjectOrErrorCompletion: + (void (^)(FBLPromiseObjectOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an object provided by completion handler if error is `nil`. + Otherwise, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapObjectOrErrorCompletion:(void (^)(FBLPromiseObjectOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)wrapErrorOrObjectCompletion: + (void (^)(FBLPromiseErrorOrObjectCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an error or object provided by completion handler. If error + is not `nil`, rejects with the error. + */ ++ (instancetype)onQueue:(dispatch_queue_t)queue + wrapErrorOrObjectCompletion:(void (^)(FBLPromiseErrorOrObjectCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)wrap2ObjectsOrErrorCompletion: + (void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an array of objects provided by completion handler in order + if error is `nil`. Otherwise, rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrap2ObjectsOrErrorCompletion:(void (^)(FBLPromise2ObjectsOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolCompletion:(void (^)(FBLPromiseBoolCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapBoolOrErrorCompletion: + (void (^)(FBLPromiseBoolOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping YES/NO when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapBoolOrErrorCompletion:(void (^)(FBLPromiseBoolOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerCompletion:(void (^)(FBLPromiseIntegerCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapIntegerOrErrorCompletion: + (void (^)(FBLPromiseIntegerOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping an integer when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapIntegerOrErrorCompletion:(void (^)(FBLPromiseIntegerOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleCompletion:(void (^)(FBLPromiseDoubleCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +/** + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)wrapDoubleOrErrorCompletion: + (void (^)(FBLPromiseDoubleOrErrorCompletion handler))work NS_SWIFT_UNAVAILABLE(""); + +/** + @param queue A queue to invoke the `work` block on. + @param work A block to perform any operations needed to resolve the promise. + @returns A promise that resolves with an `NSNumber` wrapping a double when error is `nil`. + Otherwise rejects with the error. + */ ++ (FBLPromise*)onQueue:(dispatch_queue_t)queue + wrapDoubleOrErrorCompletion:(void (^)(FBLPromiseDoubleOrErrorCompletion handler))work + NS_SWIFT_UNAVAILABLE(""); + +@end + +/** + Convenience dot-syntax wrappers for `FBLPromise` `wrap` operators. + Usage: FBLPromise.wrapCompletion(^(FBLPromiseCompletion handler) {...}) + */ +@interface FBLPromise(DotSyntax_WrapAdditions) + ++ (FBLPromise* (^)(void (^)(FBLPromiseCompletion)))wrapCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseCompletion)))wrapCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseObjectCompletion)))wrapObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletion FBL_PROMISES_DOT_SYNTAX + NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseErrorCompletion)))wrapErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseObjectOrErrorCompletion)))wrapObjectOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseErrorOrObjectCompletion)))wrapErrorOrObjectCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromise2ObjectsOrErrorCompletion))) + wrap2ObjectsOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolCompletion)))wrapBoolCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseBoolOrErrorCompletion)))wrapBoolOrErrorCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseIntegerCompletion)))wrapIntegerCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseIntegerOrErrorCompletion))) + wrapIntegerOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletion + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, + void (^)(FBLPromiseDoubleCompletion)))wrapDoubleCompletionOn + FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletion FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (FBLPromise* (^)(dispatch_queue_t, void (^)(FBLPromiseDoubleOrErrorCompletion))) + wrapDoubleOrErrorCompletionOn FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h new file mode 100644 index 000000000..b1380dc73 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromise.h @@ -0,0 +1,93 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromiseError.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + Promises synchronization construct in Objective-C. + */ +@interface FBLPromise<__covariant Value> : NSObject + +/** + Default dispatch queue used for `FBLPromise`, which is `main` if a queue is not specified. + */ +@property(class) dispatch_queue_t defaultDispatchQueue NS_REFINED_FOR_SWIFT; + +/** + Creates a pending promise. + */ ++ (instancetype)pendingPromise NS_REFINED_FOR_SWIFT; + +/** + Creates a resolved promise. + + @param resolution An object to resolve the promise with: either a value or an error. + @return A new resolved promise. + */ ++ (instancetype)resolvedWith:(nullable id)resolution NS_REFINED_FOR_SWIFT; + +/** + Synchronously fulfills the promise with a value. + + @param value An arbitrary value to fulfill the promise with, including `nil`. + */ +- (void)fulfill:(nullable Value)value NS_REFINED_FOR_SWIFT; + +/** + Synchronously rejects the promise with an error. + + @param error An error to reject the promise with. + */ +- (void)reject:(NSError *)error NS_REFINED_FOR_SWIFT; + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; +@end + +@interface FBLPromise() + +/** + Adds an object to the set of pending objects to keep strongly while the promise is pending. + Used by the Swift wrappers to keep them alive until the underlying ObjC promise is resolved. + + @param object An object to add. + */ +- (void)addPendingObject:(id)object NS_REFINED_FOR_SWIFT; + +@end + +#ifdef FBL_PROMISES_DOT_SYNTAX_IS_DEPRECATED +#define FBL_PROMISES_DOT_SYNTAX __attribute__((deprecated)) +#else +#define FBL_PROMISES_DOT_SYNTAX +#endif + +@interface FBLPromise(DotSyntaxAdditions) + +/** + Convenience dot-syntax wrappers for FBLPromise. + Usage: FBLPromise.pending() + FBLPromise.resolved(value) + + */ ++ (instancetype (^)(void))pending FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); ++ (instancetype (^)(id __nullable))resolved FBL_PROMISES_DOT_SYNTAX NS_SWIFT_UNAVAILABLE(""); + +@end + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h new file mode 100644 index 000000000..d37af536c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromiseError.h @@ -0,0 +1,43 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXTERN NSErrorDomain const FBLPromiseErrorDomain NS_REFINED_FOR_SWIFT; + +/** + Possible error codes in `FBLPromiseErrorDomain`. + */ +typedef NS_ENUM(NSInteger, FBLPromiseErrorCode) { + /** Promise failed to resolve in time. */ + FBLPromiseErrorCodeTimedOut = 1, + /** Validation predicate returned false. */ + FBLPromiseErrorCodeValidationFailure = 2, +} NS_REFINED_FOR_SWIFT; + +NS_INLINE BOOL FBLPromiseErrorIsTimedOut(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeTimedOut; +} + +NS_INLINE BOOL FBLPromiseErrorIsValidationFailure(NSError *error) NS_SWIFT_UNAVAILABLE("") { + return error.domain == FBLPromiseErrorDomain && + error.code == FBLPromiseErrorCodeValidationFailure; +} + +NS_ASSUME_NONNULL_END diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h new file mode 100644 index 000000000..2d90badb1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/FBLPromises.h @@ -0,0 +1,32 @@ +/** + Copyright 2018 Google Inc. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h new file mode 100644 index 000000000..5b014a8b3 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Headers/PromisesObjC-umbrella.h @@ -0,0 +1,36 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "FBLPromise+All.h" +#import "FBLPromise+Always.h" +#import "FBLPromise+Any.h" +#import "FBLPromise+Async.h" +#import "FBLPromise+Await.h" +#import "FBLPromise+Catch.h" +#import "FBLPromise+Delay.h" +#import "FBLPromise+Do.h" +#import "FBLPromise+Race.h" +#import "FBLPromise+Recover.h" +#import "FBLPromise+Reduce.h" +#import "FBLPromise+Retry.h" +#import "FBLPromise+Testing.h" +#import "FBLPromise+Then.h" +#import "FBLPromise+Timeout.h" +#import "FBLPromise+Validate.h" +#import "FBLPromise+Wrap.h" +#import "FBLPromise.h" +#import "FBLPromiseError.h" +#import "FBLPromises.h" + +FOUNDATION_EXPORT double FBLPromisesVersionNumber; +FOUNDATION_EXPORT const unsigned char FBLPromisesVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Info.plist new file mode 100644 index 000000000..9ed334ae1 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + PromisesObjC + CFBundleIdentifier + com.firebase.Firebase-PromisesObjC + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + PromisesObjC + CFBundlePackageType + FMWK + CFBundleVersion + 1.2.12 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap new file mode 100644 index 000000000..bd7b48e16 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module PromisesObjC { +umbrella header "PromisesObjC-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/PromisesObjC b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/PromisesObjC new file mode 100644 index 000000000..27a533f3e Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/PromisesObjC.xcframework/tvos-arm64_x86_64-simulator/PromisesObjC.framework/PromisesObjC differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/Info.plist new file mode 100644 index 000000000..5756072cf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/Info.plist @@ -0,0 +1,42 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + UserMessagingPlatform.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + UserMessagingPlatform.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentForm.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentForm.h new file mode 100644 index 000000000..91d82468d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentForm.h @@ -0,0 +1,29 @@ +#import + +@class UMPConsentForm; + +/// Provides a nonnull consentForm and a nil error if the load succeeded. Provides a nil +/// consentForm and a nonnull error if the load failed. +typedef void (^UMPConsentFormLoadCompletionHandler)(UMPConsentForm *_Nullable consentForm, + NSError *_Nullable error); + +/// Called after presentation of a UMPConsentForm finishes. +typedef void (^UMPConsentFormPresentCompletionHandler)(NSError *_Nullable error); + +/// A single use consent form object. +@interface UMPConsentForm : NSObject +/// Loads a consent form and calls completionHandler on completion. Must be called on the +/// main queue. ++ (void)loadWithCompletionHandler:(nonnull UMPConsentFormLoadCompletionHandler)completionHandler; + +/// Unavailable. Use +loadWithCompletionHandler: instead. +- (nullable instancetype)init NS_UNAVAILABLE; + +/// Presents the full screen consent form over viewController. The form is dismissed and +/// completionHandler is called after the user selects an option. +/// UMPConsentInformation.sharedInstance.consentStatus is updated prior to completionHandler being +/// called. completionHandler is called on the main queue. +- (void)presentFromViewController:(nonnull UIViewController *)viewController + completionHandler: + (nullable UMPConsentFormPresentCompletionHandler)completionHandler; +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h new file mode 100644 index 000000000..09bf4b10b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h @@ -0,0 +1,71 @@ +#import + +#import + +/// SDK version string, of a form "major.minor.patch". +extern NSString *_Nonnull const UMPVersionString; + +/// Consent status values. +typedef NS_ENUM(NSInteger, UMPConsentStatus) { + UMPConsentStatusUnknown = 0, ///< Unknown consent status. + UMPConsentStatusRequired = 1, ///< User consent required but not yet obtained. + UMPConsentStatusNotRequired = 2, ///< Consent not required. + UMPConsentStatusObtained = + 3, ///< User consent obtained, personalized vs non-personalized undefined. +}; + +/// Type of user consent. +typedef NS_ENUM(NSInteger, UMPConsentType) { + UMPConsentTypeUnknown = 0, ///< User consent either not obtained or personalized vs + ///< non-personalized status undefined. + UMPConsentTypePersonalized = 1, ///< User consented to personalized ads. + UMPConsentTypeNonPersonalized = 2, ///< User consented to non-personalized ads. +}; + +/// State values for whether the user has a consent form available to them. To check whether form +/// status has changed, an update can be requested through +/// requestConsentInfoUpdateWithParameters:completionHandler. +typedef NS_ENUM(NSInteger, UMPFormStatus) { + /// Whether a consent form is available is unknown. An update should be requested using + /// requestConsentInfoUpdateWithParameters:completionHandler. + UMPFormStatusUnknown = 0, + + /// Consent forms are available and can be loaded using [UMPConsentForm + /// loadWithCompletionHandler:] + UMPFormStatusAvailable = 1, + + /// Consent forms are unavailable. Showing a consent form is not required. + UMPFormStatusUnavailable = 2, +}; + +/// Called when the consent info request completes. Error is nil on success, and non-nil if the +/// update failed. +typedef void (^UMPConsentInformationUpdateCompletionHandler)(NSError *_Nullable error); + +/// Consent information. All methods must be called on the main thread. +@interface UMPConsentInformation : NSObject + +/// The shared consent information instance. +@property(class, nonatomic, readonly, nonnull) UMPConsentInformation *sharedInstance; + +/// The user's consent status. This value is cached between app sessions and can be read before +/// requesting updated parameters. +@property(nonatomic, readonly) UMPConsentStatus consentStatus; + +/// The user's consent type. This value is cached between app sessions and can be read before +/// requesting updated parameters. +@property(nonatomic, readonly) UMPConsentType consentType; + +/// Consent form status. This value defaults to UMPFormStatusUnknown and requires a call to +/// requestConsentInfoUpdateWithParameters:completionHandler to update. +@property(nonatomic, readonly) UMPFormStatus formStatus; + +/// Requests consent information update. Must be called before loading a consent form. +- (void)requestConsentInfoUpdateWithParameters:(nullable UMPRequestParameters *)parameters + completionHandler: + (nonnull UMPConsentInformationUpdateCompletionHandler)handler; + +/// Clears all consent state from persistent storage. +- (void)reset; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h new file mode 100644 index 000000000..a1399ec8f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h @@ -0,0 +1,20 @@ +#import + +/// Debug values for testing geography. +typedef NS_ENUM(NSInteger, UMPDebugGeography) { + UMPDebugGeographyDisabled = 0, ///< Disable geography debugging. + UMPDebugGeographyEEA = 1, ///< Geography appears as in EEA for debug devices. + UMPDebugGeographyNotEEA = 2, ///< Geography appears as not in EEA for debug devices. +}; + +/// Overrides settings for debugging or testing. +@interface UMPDebugSettings : NSObject + +/// Array of device identifier strings. Debug features are enabled for devices with these +/// identifiers. Debug features are always enabled for simulators. +@property(nonatomic, nullable) NSArray *testDeviceIdentifiers; + +/// Debug geography. +@property(nonatomic) UMPDebugGeography geography; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPError.h new file mode 100644 index 000000000..0fcbbcbaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPError.h @@ -0,0 +1,21 @@ +#import + +/// Error domain for all SDK errors. +extern NSErrorDomain _Nonnull const UMPErrorDomain; + +/// Error codes used when making requests to update consent info. +typedef NS_ENUM(NSInteger, UMPRequestErrorCode) { + UMPRequestErrorCodeInternal = 1, ///< Internal error. + UMPRequestErrorCodeInvalidAppID = 2, ///< The application's app ID is invalid. + UMPRequestErrorCodeNetwork = 3, ///< Network error communicating with Funding Choices. + UMPRequestErrorCodeMisconfiguration = + 4, ///< A misconfiguration exists in the Funding Choices UI. +}; + +/// Error codes used when loading and showing forms. +typedef NS_ENUM(NSInteger, UMPFormErrorCode) { + UMPFormErrorCodeInternal = 5, ///< Internal error. + UMPFormErrorCodeAlreadyUsed = 6, ///< Form was already used. + UMPFormErrorCodeUnavailable = 7, ///< Form is unavailable. + UMPFormErrorCodeTimeout = 8, ///< Loading a form timed out. +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h new file mode 100644 index 000000000..f3b80f989 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h @@ -0,0 +1,12 @@ +#import + +/// Parameters sent on updates to user consent info. +@interface UMPRequestParameters : NSObject + +/// Indicates whether the user is tagged for under age of consent. +@property(nonatomic) BOOL tagForUnderAgeOfConsent; + +/// Debug settings for the request. +@property(nonatomic, copy, nullable) UMPDebugSettings *debugSettings; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h new file mode 100644 index 000000000..53eb1ac8c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h @@ -0,0 +1,5 @@ +#import +#import +#import +#import +#import diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Modules/module.modulemap new file mode 100644 index 000000000..e07529021 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Modules/module.modulemap @@ -0,0 +1,12 @@ +framework module UserMessagingPlatform { + umbrella header "UserMessagingPlatform.h" + + export * + module * { export * } + + header "UMPConsentForm.h" + header "UMPDebugSettings.h" + header "UMPError.h" + header "UMPConsentInformation.h" + header "UMPRequestParameters.h" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/UserMessagingPlatform b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/UserMessagingPlatform new file mode 100644 index 000000000..8c0741de8 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/UserMessagingPlatform differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentForm.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentForm.h new file mode 100644 index 000000000..91d82468d --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentForm.h @@ -0,0 +1,29 @@ +#import + +@class UMPConsentForm; + +/// Provides a nonnull consentForm and a nil error if the load succeeded. Provides a nil +/// consentForm and a nonnull error if the load failed. +typedef void (^UMPConsentFormLoadCompletionHandler)(UMPConsentForm *_Nullable consentForm, + NSError *_Nullable error); + +/// Called after presentation of a UMPConsentForm finishes. +typedef void (^UMPConsentFormPresentCompletionHandler)(NSError *_Nullable error); + +/// A single use consent form object. +@interface UMPConsentForm : NSObject +/// Loads a consent form and calls completionHandler on completion. Must be called on the +/// main queue. ++ (void)loadWithCompletionHandler:(nonnull UMPConsentFormLoadCompletionHandler)completionHandler; + +/// Unavailable. Use +loadWithCompletionHandler: instead. +- (nullable instancetype)init NS_UNAVAILABLE; + +/// Presents the full screen consent form over viewController. The form is dismissed and +/// completionHandler is called after the user selects an option. +/// UMPConsentInformation.sharedInstance.consentStatus is updated prior to completionHandler being +/// called. completionHandler is called on the main queue. +- (void)presentFromViewController:(nonnull UIViewController *)viewController + completionHandler: + (nullable UMPConsentFormPresentCompletionHandler)completionHandler; +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h new file mode 100644 index 000000000..09bf4b10b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h @@ -0,0 +1,71 @@ +#import + +#import + +/// SDK version string, of a form "major.minor.patch". +extern NSString *_Nonnull const UMPVersionString; + +/// Consent status values. +typedef NS_ENUM(NSInteger, UMPConsentStatus) { + UMPConsentStatusUnknown = 0, ///< Unknown consent status. + UMPConsentStatusRequired = 1, ///< User consent required but not yet obtained. + UMPConsentStatusNotRequired = 2, ///< Consent not required. + UMPConsentStatusObtained = + 3, ///< User consent obtained, personalized vs non-personalized undefined. +}; + +/// Type of user consent. +typedef NS_ENUM(NSInteger, UMPConsentType) { + UMPConsentTypeUnknown = 0, ///< User consent either not obtained or personalized vs + ///< non-personalized status undefined. + UMPConsentTypePersonalized = 1, ///< User consented to personalized ads. + UMPConsentTypeNonPersonalized = 2, ///< User consented to non-personalized ads. +}; + +/// State values for whether the user has a consent form available to them. To check whether form +/// status has changed, an update can be requested through +/// requestConsentInfoUpdateWithParameters:completionHandler. +typedef NS_ENUM(NSInteger, UMPFormStatus) { + /// Whether a consent form is available is unknown. An update should be requested using + /// requestConsentInfoUpdateWithParameters:completionHandler. + UMPFormStatusUnknown = 0, + + /// Consent forms are available and can be loaded using [UMPConsentForm + /// loadWithCompletionHandler:] + UMPFormStatusAvailable = 1, + + /// Consent forms are unavailable. Showing a consent form is not required. + UMPFormStatusUnavailable = 2, +}; + +/// Called when the consent info request completes. Error is nil on success, and non-nil if the +/// update failed. +typedef void (^UMPConsentInformationUpdateCompletionHandler)(NSError *_Nullable error); + +/// Consent information. All methods must be called on the main thread. +@interface UMPConsentInformation : NSObject + +/// The shared consent information instance. +@property(class, nonatomic, readonly, nonnull) UMPConsentInformation *sharedInstance; + +/// The user's consent status. This value is cached between app sessions and can be read before +/// requesting updated parameters. +@property(nonatomic, readonly) UMPConsentStatus consentStatus; + +/// The user's consent type. This value is cached between app sessions and can be read before +/// requesting updated parameters. +@property(nonatomic, readonly) UMPConsentType consentType; + +/// Consent form status. This value defaults to UMPFormStatusUnknown and requires a call to +/// requestConsentInfoUpdateWithParameters:completionHandler to update. +@property(nonatomic, readonly) UMPFormStatus formStatus; + +/// Requests consent information update. Must be called before loading a consent form. +- (void)requestConsentInfoUpdateWithParameters:(nullable UMPRequestParameters *)parameters + completionHandler: + (nonnull UMPConsentInformationUpdateCompletionHandler)handler; + +/// Clears all consent state from persistent storage. +- (void)reset; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h new file mode 100644 index 000000000..a1399ec8f --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h @@ -0,0 +1,20 @@ +#import + +/// Debug values for testing geography. +typedef NS_ENUM(NSInteger, UMPDebugGeography) { + UMPDebugGeographyDisabled = 0, ///< Disable geography debugging. + UMPDebugGeographyEEA = 1, ///< Geography appears as in EEA for debug devices. + UMPDebugGeographyNotEEA = 2, ///< Geography appears as not in EEA for debug devices. +}; + +/// Overrides settings for debugging or testing. +@interface UMPDebugSettings : NSObject + +/// Array of device identifier strings. Debug features are enabled for devices with these +/// identifiers. Debug features are always enabled for simulators. +@property(nonatomic, nullable) NSArray *testDeviceIdentifiers; + +/// Debug geography. +@property(nonatomic) UMPDebugGeography geography; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPError.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPError.h new file mode 100644 index 000000000..0fcbbcbaf --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPError.h @@ -0,0 +1,21 @@ +#import + +/// Error domain for all SDK errors. +extern NSErrorDomain _Nonnull const UMPErrorDomain; + +/// Error codes used when making requests to update consent info. +typedef NS_ENUM(NSInteger, UMPRequestErrorCode) { + UMPRequestErrorCodeInternal = 1, ///< Internal error. + UMPRequestErrorCodeInvalidAppID = 2, ///< The application's app ID is invalid. + UMPRequestErrorCodeNetwork = 3, ///< Network error communicating with Funding Choices. + UMPRequestErrorCodeMisconfiguration = + 4, ///< A misconfiguration exists in the Funding Choices UI. +}; + +/// Error codes used when loading and showing forms. +typedef NS_ENUM(NSInteger, UMPFormErrorCode) { + UMPFormErrorCodeInternal = 5, ///< Internal error. + UMPFormErrorCodeAlreadyUsed = 6, ///< Form was already used. + UMPFormErrorCodeUnavailable = 7, ///< Form is unavailable. + UMPFormErrorCodeTimeout = 8, ///< Loading a form timed out. +}; diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h new file mode 100644 index 000000000..f3b80f989 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h @@ -0,0 +1,12 @@ +#import + +/// Parameters sent on updates to user consent info. +@interface UMPRequestParameters : NSObject + +/// Indicates whether the user is tagged for under age of consent. +@property(nonatomic) BOOL tagForUnderAgeOfConsent; + +/// Debug settings for the request. +@property(nonatomic, copy, nullable) UMPDebugSettings *debugSettings; + +@end diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h new file mode 100644 index 000000000..53eb1ac8c --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h @@ -0,0 +1,5 @@ +#import +#import +#import +#import +#import diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Modules/module.modulemap new file mode 100644 index 000000000..e07529021 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/Modules/module.modulemap @@ -0,0 +1,12 @@ +framework module UserMessagingPlatform { + umbrella header "UserMessagingPlatform.h" + + export * + module * { export * } + + header "UMPConsentForm.h" + header "UMPDebugSettings.h" + header "UMPError.h" + header "UMPConsentInformation.h" + header "UMPRequestParameters.h" +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/UserMessagingPlatform b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/UserMessagingPlatform new file mode 100644 index 000000000..e6a68b136 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/UserMessagingPlatform.xcframework/ios-arm64_i386_x86_64-simulator/UserMessagingPlatform.framework/UserMessagingPlatform differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/Info.plist new file mode 100644 index 000000000..80c8193dd --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/Info.plist @@ -0,0 +1,95 @@ + + + + + AvailableLibraries + + + LibraryIdentifier + ios-arm64_armv7 + LibraryPath + nanopb.framework + SupportedArchitectures + + arm64 + armv7 + + SupportedPlatform + ios + + + LibraryIdentifier + tvos-arm64_x86_64-simulator + LibraryPath + nanopb.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + tvos + SupportedPlatformVariant + simulator + + + LibraryIdentifier + macos-x86_64 + LibraryPath + nanopb.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + macos + + + LibraryIdentifier + ios-arm64_i386_x86_64-simulator + LibraryPath + nanopb.framework + SupportedArchitectures + + arm64 + i386 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + LibraryIdentifier + ios-x86_64-maccatalyst + LibraryPath + nanopb.framework + SupportedArchitectures + + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + maccatalyst + + + LibraryIdentifier + tvos-arm64 + LibraryPath + nanopb.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + tvos + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..07e77b38a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/nanopb new file mode 100644 index 000000000..b0b9f5166 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_armv7/nanopb.framework/nanopb differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..07e77b38a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/nanopb new file mode 100644 index 000000000..ac5cc24f4 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-arm64_i386_x86_64-simulator/nanopb.framework/nanopb differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..07e77b38a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/nanopb new file mode 100644 index 000000000..51493b03e Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/ios-x86_64-maccatalyst/nanopb.framework/nanopb differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..6d7e31e1b --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/nanopb new file mode 100644 index 000000000..48dcb4597 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/macos-x86_64/nanopb.framework/nanopb differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..07e77b38a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/nanopb new file mode 100644 index 000000000..0464b7945 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64/nanopb.framework/nanopb differ diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h new file mode 100644 index 000000000..07e77b38a --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/nanopb-umbrella.h @@ -0,0 +1,26 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "pb.h" +#import "pb_common.h" +#import "pb_decode.h" +#import "pb_encode.h" +#import "pb.h" +#import "pb_decode.h" +#import "pb_common.h" +#import "pb.h" +#import "pb_encode.h" +#import "pb_common.h" + +FOUNDATION_EXPORT double nanopbVersionNumber; +FOUNDATION_EXPORT const unsigned char nanopbVersionString[]; + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb.h new file mode 100644 index 000000000..929bfa1ed --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb.h @@ -0,0 +1,599 @@ +/* Common parts of the nanopb library. Most of these are quite low-level + * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. + */ + +#ifndef PB_H_INCLUDED +#define PB_H_INCLUDED + +/***************************************************************** + * Nanopb compilation time options. You can change these here by * + * uncommenting the lines, or on the compiler command line. * + *****************************************************************/ + +/* Enable support for dynamically allocated fields */ +/* #define PB_ENABLE_MALLOC 1 */ + +/* Define this if your CPU / compiler combination does not support + * unaligned memory access to packed structures. */ +/* #define PB_NO_PACKED_STRUCTS 1 */ + +/* Increase the number of required fields that are tracked. + * A compiler warning will tell if you need this. */ +/* #define PB_MAX_REQUIRED_FIELDS 256 */ + +/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ +/* #define PB_FIELD_16BIT 1 */ + +/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ +/* #define PB_FIELD_32BIT 1 */ + +/* Disable support for error messages in order to save some code space. */ +/* #define PB_NO_ERRMSG 1 */ + +/* Disable support for custom streams (support only memory buffers). */ +/* #define PB_BUFFER_ONLY 1 */ + +/* Switch back to the old-style callback function signature. + * This was the default until nanopb-0.2.1. */ +/* #define PB_OLD_CALLBACK_STYLE */ + + +/* Don't encode scalar arrays as packed. This is only to be used when + * the decoder on the receiving side cannot process packed scalar arrays. + * Such example is older protobuf.js. */ +/* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ + +/****************************************************************** + * You usually don't need to change anything below this line. * + * Feel free to look around and use the defined macros, though. * + ******************************************************************/ + + +/* Version of the nanopb library. Just in case you want to check it in + * your own program. */ +#define NANOPB_VERSION nanopb-0.3.9.7 + +/* Include all the system headers needed by nanopb. You will need the + * definitions of the following: + * - strlen, memcpy, memset functions + * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t + * - size_t + * - bool + * + * If you don't have the standard header files, you can instead provide + * a custom header that defines or includes all this. In that case, + * define PB_SYSTEM_HEADER to the path of this file. + */ +#ifdef PB_SYSTEM_HEADER +#include PB_SYSTEM_HEADER +#else +#include +#include +#include +#include + +#ifdef PB_ENABLE_MALLOC +#include +#endif +#endif + +/* Macro for defining packed structures (compiler dependent). + * This just reduces memory requirements, but is not required. + */ +#if defined(PB_NO_PACKED_STRUCTS) + /* Disable struct packing */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#elif defined(__GNUC__) || defined(__clang__) + /* For GCC and clang */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed __attribute__((packed)) +#elif defined(__ICCARM__) || defined(__CC_ARM) + /* For IAR ARM and Keil MDK-ARM compilers */ +# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") +# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") +# define pb_packed +#elif defined(_MSC_VER) && (_MSC_VER >= 1500) + /* For Microsoft Visual C++ */ +# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) +# define PB_PACKED_STRUCT_END __pragma(pack(pop)) +# define pb_packed +#else + /* Unknown compiler */ +# define PB_PACKED_STRUCT_START +# define PB_PACKED_STRUCT_END +# define pb_packed +#endif + +/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ +#ifndef PB_UNUSED +#define PB_UNUSED(x) (void)(x) +#endif + +/* Compile-time assertion, used for checking compatible compilation options. + * If this does not work properly on your compiler, use + * #define PB_NO_STATIC_ASSERT to disable it. + * + * But before doing that, check carefully the error message / place where it + * comes from to see if the error has a real cause. Unfortunately the error + * message is not always very clear to read, but you can see the reason better + * in the place where the PB_STATIC_ASSERT macro was called. + */ +#ifndef PB_NO_STATIC_ASSERT +#ifndef PB_STATIC_ASSERT +#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; +#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) +#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER +#endif +#else +#define PB_STATIC_ASSERT(COND,MSG) +#endif + +/* Number of required fields to keep track of. */ +#ifndef PB_MAX_REQUIRED_FIELDS +#define PB_MAX_REQUIRED_FIELDS 64 +#endif + +#if PB_MAX_REQUIRED_FIELDS < 64 +#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). +#endif + +/* List of possible field types. These are used in the autogenerated code. + * Least-significant 4 bits tell the scalar type + * Most-significant 4 bits specify repeated/required/packed etc. + */ + +typedef uint_least8_t pb_type_t; + +/**** Field data types ****/ + +/* Numeric types */ +#define PB_LTYPE_BOOL 0x00 /* bool */ +#define PB_LTYPE_VARINT 0x01 /* int32, int64, enum, bool */ +#define PB_LTYPE_UVARINT 0x02 /* uint32, uint64 */ +#define PB_LTYPE_SVARINT 0x03 /* sint32, sint64 */ +#define PB_LTYPE_FIXED32 0x04 /* fixed32, sfixed32, float */ +#define PB_LTYPE_FIXED64 0x05 /* fixed64, sfixed64, double */ + +/* Marker for last packable field type. */ +#define PB_LTYPE_LAST_PACKABLE 0x05 + +/* Byte array with pre-allocated buffer. + * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ +#define PB_LTYPE_BYTES 0x06 + +/* String with pre-allocated buffer. + * data_size is the maximum length. */ +#define PB_LTYPE_STRING 0x07 + +/* Submessage + * submsg_fields is pointer to field descriptions */ +#define PB_LTYPE_SUBMESSAGE 0x08 + +/* Extension pseudo-field + * The field contains a pointer to pb_extension_t */ +#define PB_LTYPE_EXTENSION 0x09 + +/* Byte array with inline, pre-allocated byffer. + * data_size is the length of the inline, allocated buffer. + * This differs from PB_LTYPE_BYTES by defining the element as + * pb_byte_t[data_size] rather than pb_bytes_array_t. */ +#define PB_LTYPE_FIXED_LENGTH_BYTES 0x0A + +/* Number of declared LTYPES */ +#define PB_LTYPES_COUNT 0x0B +#define PB_LTYPE_MASK 0x0F + +/**** Field repetition rules ****/ + +#define PB_HTYPE_REQUIRED 0x00 +#define PB_HTYPE_OPTIONAL 0x10 +#define PB_HTYPE_REPEATED 0x20 +#define PB_HTYPE_ONEOF 0x30 +#define PB_HTYPE_MASK 0x30 + +/**** Field allocation types ****/ + +#define PB_ATYPE_STATIC 0x00 +#define PB_ATYPE_POINTER 0x80 +#define PB_ATYPE_CALLBACK 0x40 +#define PB_ATYPE_MASK 0xC0 + +#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) +#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) +#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) + +/* Data type used for storing sizes of struct fields + * and array counts. + */ +#if defined(PB_FIELD_32BIT) + typedef uint32_t pb_size_t; + typedef int32_t pb_ssize_t; +#elif defined(PB_FIELD_16BIT) + typedef uint_least16_t pb_size_t; + typedef int_least16_t pb_ssize_t; +#else + typedef uint_least8_t pb_size_t; + typedef int_least8_t pb_ssize_t; +#endif +#define PB_SIZE_MAX ((pb_size_t)-1) + +/* Data type for storing encoded data and other byte streams. + * This typedef exists to support platforms where uint8_t does not exist. + * You can regard it as equivalent on uint8_t on other platforms. + */ +typedef uint_least8_t pb_byte_t; + +/* This structure is used in auto-generated constants + * to specify struct fields. + * You can change field sizes if you need structures + * larger than 256 bytes or field tags larger than 256. + * The compiler should complain if your .proto has such + * structures. Fix that by defining PB_FIELD_16BIT or + * PB_FIELD_32BIT. + */ +PB_PACKED_STRUCT_START +typedef struct pb_field_s pb_field_t; +struct pb_field_s { + pb_size_t tag; + pb_type_t type; + pb_size_t data_offset; /* Offset of field data, relative to previous field. */ + pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ + pb_size_t data_size; /* Data size in bytes for a single item */ + pb_size_t array_size; /* Maximum number of entries in array */ + + /* Field definitions for submessage + * OR default value for all other non-array, non-callback types + * If null, then field will zeroed. */ + const void *ptr; +} pb_packed; +PB_PACKED_STRUCT_END + +/* Make sure that the standard integer types are of the expected sizes. + * Otherwise fixed32/fixed64 fields can break. + * + * If you get errors here, it probably means that your stdint.h is not + * correct for your platform. + */ +#ifndef PB_WITHOUT_64BIT +PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) +PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) +#endif + +/* This structure is used for 'bytes' arrays. + * It has the number of bytes in the beginning, and after that an array. + * Note that actual structs used will have a different length of bytes array. + */ +#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } +#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) + +struct pb_bytes_array_s { + pb_size_t size; + pb_byte_t bytes[1]; +}; +typedef struct pb_bytes_array_s pb_bytes_array_t; + +/* This structure is used for giving the callback function. + * It is stored in the message structure and filled in by the method that + * calls pb_decode. + * + * The decoding callback will be given a limited-length stream + * If the wire type was string, the length is the length of the string. + * If the wire type was a varint/fixed32/fixed64, the length is the length + * of the actual value. + * The function may be called multiple times (especially for repeated types, + * but also otherwise if the message happens to contain the field multiple + * times.) + * + * The encoding callback will receive the actual output stream. + * It should write all the data in one call, including the field tag and + * wire type. It can write multiple fields. + * + * The callback can be null if you want to skip a field. + */ +typedef struct pb_istream_s pb_istream_t; +typedef struct pb_ostream_s pb_ostream_t; +typedef struct pb_callback_s pb_callback_t; +struct pb_callback_s { +#ifdef PB_OLD_CALLBACK_STYLE + /* Deprecated since nanopb-0.2.1 */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); + } funcs; +#else + /* New function signature, which allows modifying arg contents in callback. */ + union { + bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); + bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); + } funcs; +#endif + + /* Free arg for use by callback */ + void *arg; +}; + +/* Wire types. Library user needs these only in encoder callbacks. */ +typedef enum { + PB_WT_VARINT = 0, + PB_WT_64BIT = 1, + PB_WT_STRING = 2, + PB_WT_32BIT = 5 +} pb_wire_type_t; + +/* Structure for defining the handling of unknown/extension fields. + * Usually the pb_extension_type_t structure is automatically generated, + * while the pb_extension_t structure is created by the user. However, + * if you want to catch all unknown fields, you can also create a custom + * pb_extension_type_t with your own callback. + */ +typedef struct pb_extension_type_s pb_extension_type_t; +typedef struct pb_extension_s pb_extension_t; +struct pb_extension_type_s { + /* Called for each unknown field in the message. + * If you handle the field, read off all of its data and return true. + * If you do not handle the field, do not read anything and return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, + uint32_t tag, pb_wire_type_t wire_type); + + /* Called once after all regular fields have been encoded. + * If you have something to write, do so and return true. + * If you do not have anything to write, just return true. + * If you run into an error, return false. + * Set to NULL for default handler. + */ + bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); + + /* Free field for use by the callback. */ + const void *arg; +}; + +struct pb_extension_s { + /* Type describing the extension field. Usually you'll initialize + * this to a pointer to the automatically generated structure. */ + const pb_extension_type_t *type; + + /* Destination for the decoded data. This must match the datatype + * of the extension field. */ + void *dest; + + /* Pointer to the next extension handler, or NULL. + * If this extension does not match a field, the next handler is + * automatically called. */ + pb_extension_t *next; + + /* The decoder sets this to true if the extension was found. + * Ignored for encoding. */ + bool found; +}; + +/* Memory allocation functions to use. You can define pb_realloc and + * pb_free to custom functions if you want. */ +#ifdef PB_ENABLE_MALLOC +# ifndef pb_realloc +# define pb_realloc(ptr, size) realloc(ptr, size) +# endif +# ifndef pb_free +# define pb_free(ptr) free(ptr) +# endif +#endif + +/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ +#define PB_PROTO_HEADER_VERSION 30 + +/* These macros are used to declare pb_field_t's in the constant array. */ +/* Size of a structure member, in bytes. */ +#define pb_membersize(st, m) (sizeof ((st*)0)->m) +/* Number of entries in an array. */ +#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) +/* Delta from start of one member to the start of another member. */ +#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) +/* Marks the end of the field list */ +#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} + +/* Macros for filling in the data_offset field */ +/* data_offset for first field in a message */ +#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) +/* data_offset for subsequent fields */ +#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) +/* data offset for subsequent fields inside an union (oneof) */ +#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) +/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ +#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ + ? PB_DATAOFFSET_FIRST(st, m1, m2) \ + : PB_DATAOFFSET_OTHER(st, m1, m2)) + +/* Required fields are the simplest. They just have delta (padding) from + * previous field end, and the size of the field. Pointer is used for + * submessages and default values. + */ +#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional fields add the delta to the has_ variable. */ +#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, \ + pb_delta(st, has_ ## m, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Repeated fields have a _count field and also the maximum number of entries. */ +#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ + fd, \ + pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), \ + pb_arraysize(st, m), ptr} + +/* Allocated fields carry the size of the actual data, not the pointer */ +#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Optional fields don't need a has_ variable, as information would be redundant */ +#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Same as optional fields*/ +#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m[0]), 0, ptr} + +/* Repeated fields have a _count field and a pointer to array of pointers */ +#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ + fd, pb_delta(st, m ## _count, m), \ + pb_membersize(st, m[0]), 0, ptr} + +/* Callbacks are much like required fields except with special datatype. */ +#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ + fd, 0, pb_membersize(st, m), 0, ptr} + +/* Optional extensions don't have the has_ field, as that would be redundant. + * Furthermore, the combination of OPTIONAL without has_ field is used + * for indicating proto3 style fields. Extensions exist in proto2 mode only, + * so they should be encoded according to proto2 rules. To avoid the conflict, + * extensions are marked as REQUIRED instead. + */ +#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ + 0, \ + 0, \ + pb_membersize(st, m), 0, ptr} + +#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) + +#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ + PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) + +/* The mapping from protobuf types to LTYPEs is done using these macros. */ +#define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL +#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES +#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT +#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT +#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE +#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 +#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 +#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT +#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING +#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT +#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION +#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES + +/* This is the actual macro used in field descriptions. + * It takes these arguments: + * - Field tag number + * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, + * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 + * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION + * - Field rules: REQUIRED, OPTIONAL or REPEATED + * - Allocation: STATIC, CALLBACK or POINTER + * - Placement: FIRST or OTHER, depending on if this is the first field in structure. + * - Message name + * - Field name + * - Previous field name (or field name again for first field) + * - Pointer to default value or submsg fields. + */ + +#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ ## rules ## _ ## allocation(tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* Field description for repeated static fixed count fields.*/ +#define PB_REPEATED_FIXED_COUNT(tag, type, placement, message, field, prevfield, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | PB_LTYPE_MAP_ ## type, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + 0, \ + pb_membersize(message, field[0]), \ + pb_arraysize(message, field), ptr} + +/* Field description for oneof fields. This requires taking into account the + * union name also, that's why a separate set of macros is needed. + */ +#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m), 0, ptr} + +#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, u.m), \ + pb_membersize(st, u.m[0]), 0, ptr} + +#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ + {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ + fd, pb_delta(st, which_ ## u, m), \ + pb_membersize(st, m[0]), 0, ptr} + +#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ + PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ + PB_DATAOFFSET_ ## placement(message, field, prevfield), \ + PB_LTYPE_MAP_ ## type, ptr) + +/* These macros are used for giving out error messages. + * They are mostly a debugging aid; the main error information + * is the true/false return value from functions. + * Some code space can be saved by disabling the error + * messages if not used. + * + * PB_SET_ERROR() sets the error message if none has been set yet. + * msg must be a constant string literal. + * PB_GET_ERROR() always returns a pointer to a string. + * PB_RETURN_ERROR() sets the error and returns false from current + * function. + */ +#ifdef PB_NO_ERRMSG +#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) +#define PB_GET_ERROR(stream) "(errmsg disabled)" +#else +#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) +#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") +#endif + +#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_common.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_common.h new file mode 100644 index 000000000..60b3d3749 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_common.h @@ -0,0 +1,42 @@ +/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. + * These functions are rarely needed by applications directly. + */ + +#ifndef PB_COMMON_H_INCLUDED +#define PB_COMMON_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Iterator for pb_field_t list */ +struct pb_field_iter_s { + const pb_field_t *start; /* Start of the pb_field_t array */ + const pb_field_t *pos; /* Current position of the iterator */ + unsigned required_field_index; /* Zero-based index that counts only the required fields */ + void *dest_struct; /* Pointer to start of the structure */ + void *pData; /* Pointer to current field value */ + void *pSize; /* Pointer to count/has field */ +}; +typedef struct pb_field_iter_s pb_field_iter_t; + +/* Initialize the field iterator structure to beginning. + * Returns false if the message type is empty. */ +bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); + +/* Advance the iterator to the next field. + * Returns false when the iterator wraps back to the first field. */ +bool pb_field_iter_next(pb_field_iter_t *iter); + +/* Advance the iterator until it points at a field with the given tag. + * Returns false if no such field exists. */ +bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_decode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_decode.h new file mode 100644 index 000000000..3577c2016 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_decode.h @@ -0,0 +1,178 @@ +/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. + * The main function is pb_decode. You also need an input stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_DECODE_H_INCLUDED +#define PB_DECODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom input streams. You will need to provide + * a callback function to read the bytes from your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause decoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer), + * and rely on pb_read to verify that no-body reads past bytes_left. + * 3) Your callback may be used with substreams, in which case bytes_left + * is different than from the main stream. Don't use bytes_left to compute + * any pointers. + */ +struct pb_istream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + */ + int *callback; +#else + bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); +#endif + + void *state; /* Free field for use by callback implementation */ + size_t bytes_left; + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main decoding functions * + ***************************/ + +/* Decode a single protocol buffers message from input stream into a C structure. + * Returns true on success, false on any failure. + * The actual struct pointed to by dest must match the description in fields. + * Callback fields of the destination structure must be initialized by caller. + * All other fields will be initialized by this function. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_istream_t stream; + * + * // ... read some data into buffer ... + * + * stream = pb_istream_from_buffer(buffer, count); + * pb_decode(&stream, MyMessage_fields, &msg); + */ +bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except does not initialize the destination structure + * to default values. This is slightly faster if you need no default values + * and just do memset(struct, 0, sizeof(struct)) yourself. + * + * This can also be used for 'merging' two messages, i.e. update only the + * fields that exist in the new message. + * + * Note: If this function returns with an error, it will not release any + * dynamically allocated fields. You will need to call pb_release() yourself. + */ +bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except expects the stream to start with the message size + * encoded as varint. Corresponds to parseDelimitedFrom() in Google's + * protobuf API. + */ +bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode_delimited, except that it does not initialize the destination structure. + * See pb_decode_noinit + */ +bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +/* Same as pb_decode, except allows the message to be terminated with a null byte. + * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour + * is not supported in most other protobuf implementations, so pb_decode_delimited() + * is a better option for compatibility. + */ +bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); + +#ifdef PB_ENABLE_MALLOC +/* Release any allocated pointer fields. If you use dynamic allocation, you should + * call this for any successfully decoded message when you are done with it. If + * pb_decode() returns with an error, the message is already released. + */ +void pb_release(const pb_field_t fields[], void *dest_struct); +#endif + + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an input stream for reading from a memory buffer. + * + * Alternatively, you can use a custom stream that reads directly from e.g. + * a file or a network socket. + */ +pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); + +/* Function to read from a pb_istream_t. You can use this if you need to + * read some custom header data, or to read data in field callbacks. + */ +bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Decode the tag for the next field in the stream. Gives the wire type and + * field tag. At end of the message, returns false and sets eof to true. */ +bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); + +/* Skip the field payload data, given the wire type. */ +bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); + +/* Decode an integer in the varint format. This works for enum, int32, + * int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); +#else +#define pb_decode_varint pb_decode_varint32 +#endif + +/* Decode an integer in the varint format. This works for enum, int32, + * and uint32 field types. */ +bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); + +/* Decode a bool value in varint format. */ +bool pb_decode_bool(pb_istream_t *stream, bool *dest); + +/* Decode an integer in the zig-zagged svarint format. This works for sint32 + * and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); +#else +bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); +#endif + +/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to + * a 4-byte wide C variable. */ +bool pb_decode_fixed32(pb_istream_t *stream, void *dest); + +#ifndef PB_WITHOUT_64BIT +/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to + * a 8-byte wide C variable. */ +bool pb_decode_fixed64(pb_istream_t *stream, void *dest); +#endif + +/* Make a limited-length substream for reading a PB_WT_STRING field. */ +bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); +bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_encode.h b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_encode.h new file mode 100644 index 000000000..b1d822f30 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Headers/pb_encode.h @@ -0,0 +1,170 @@ +/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. + * The main function is pb_encode. You also need an output stream, and the + * field descriptions created by nanopb_generator.py. + */ + +#ifndef PB_ENCODE_H_INCLUDED +#define PB_ENCODE_H_INCLUDED + +#include "pb.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Structure for defining custom output streams. You will need to provide + * a callback function to write the bytes to your storage, which can be + * for example a file or a network socket. + * + * The callback must conform to these rules: + * + * 1) Return false on IO errors. This will cause encoding to abort. + * 2) You can use state to store your own data (e.g. buffer pointer). + * 3) pb_write will update bytes_written after your callback runs. + * 4) Substreams will modify max_size and bytes_written. Don't use them + * to calculate any pointers. + */ +struct pb_ostream_s +{ +#ifdef PB_BUFFER_ONLY + /* Callback pointer is not used in buffer-only configuration. + * Having an int pointer here allows binary compatibility but + * gives an error if someone tries to assign callback function. + * Also, NULL pointer marks a 'sizing stream' that does not + * write anything. + */ + int *callback; +#else + bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); +#endif + void *state; /* Free field for use by callback implementation. */ + size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ + size_t bytes_written; /* Number of bytes written so far. */ + +#ifndef PB_NO_ERRMSG + const char *errmsg; +#endif +}; + +/*************************** + * Main encoding functions * + ***************************/ + +/* Encode a single protocol buffers message from C structure into a stream. + * Returns true on success, false on any failure. + * The actual struct pointed to by src_struct must match the description in fields. + * All required fields in the struct are assumed to have been filled in. + * + * Example usage: + * MyMessage msg = {}; + * uint8_t buffer[64]; + * pb_ostream_t stream; + * + * msg.field1 = 42; + * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); + * pb_encode(&stream, MyMessage_fields, &msg); + */ +bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but prepends the length of the message as a varint. + * Corresponds to writeDelimitedTo() in Google's protobuf API. + */ +bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Same as pb_encode, but appends a null byte to the message for termination. + * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() + * is a better option for compatibility. + */ +bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +/* Encode the message to get the size of the encoded data, but do not store + * the data. */ +bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); + +/************************************** + * Functions for manipulating streams * + **************************************/ + +/* Create an output stream for writing into a memory buffer. + * The number of bytes written can be found in stream.bytes_written after + * encoding the message. + * + * Alternatively, you can use a custom stream that writes directly to e.g. + * a file or a network socket. + */ +pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); + +/* Pseudo-stream for measuring the size of a message without actually storing + * the encoded data. + * + * Example usage: + * MyMessage msg = {}; + * pb_ostream_t stream = PB_OSTREAM_SIZING; + * pb_encode(&stream, MyMessage_fields, &msg); + * printf("Message size is %d\n", stream.bytes_written); + */ +#ifndef PB_NO_ERRMSG +#define PB_OSTREAM_SIZING {0,0,0,0,0} +#else +#define PB_OSTREAM_SIZING {0,0,0,0} +#endif + +/* Function to write into a pb_ostream_t stream. You can use this if you need + * to append or prepend some custom headers to the message. + */ +bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); + + +/************************************************ + * Helper functions for writing field callbacks * + ************************************************/ + +/* Encode field header based on type and field number defined in the field + * structure. Call this from the callback before writing out field contents. */ +bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); + +/* Encode field header by manually specifying wire type. You need to use this + * if you want to write out packed arrays from a callback field. */ +bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); + +/* Encode an integer in the varint format. + * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); +#else +bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); +#endif + +/* Encode an integer in the zig-zagged svarint format. + * This works for sint32 and sint64. */ +#ifndef PB_WITHOUT_64BIT +bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); +#else +bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); +#endif + +/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ +bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); + +/* Encode a fixed32, sfixed32 or float value. + * You need to pass a pointer to a 4-byte wide C variable. */ +bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); + +#ifndef PB_WITHOUT_64BIT +/* Encode a fixed64, sfixed64 or double value. + * You need to pass a pointer to a 8-byte wide C variable. */ +bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); +#endif + +/* Encode a submessage field. + * You need to pass the pb_field_t array and pointer to struct, just like + * with pb_encode(). This internally encodes the submessage twice, first to + * calculate message size and then to actually write it out. + */ +bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Info.plist b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Info.plist new file mode 100644 index 000000000..de818a8ec --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleExecutable + nanopb + CFBundleIdentifier + com.firebase.Firebase-nanopb + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nanopb + CFBundlePackageType + FMWK + CFBundleVersion + 2.30907.0 + DTSDKName + iphonesimulator11.2 + + diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Modules/module.modulemap b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Modules/module.modulemap new file mode 100644 index 000000000..611ce4ca6 --- /dev/null +++ b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module nanopb { +umbrella header "nanopb-umbrella.h" +export * +module * { export * } +} diff --git a/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/nanopb b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/nanopb new file mode 100644 index 000000000..92bff3977 Binary files /dev/null and b/tests/UnitTestApp/mediationsdk/GoogleAdMobSDK/nanopb.xcframework/tvos-arm64_x86_64-simulator/nanopb.framework/nanopb differ