diff --git a/ios/Classes/TiAdmobModule.m b/ios/Classes/TiAdmobModule.m index 3cdb7a7c..ac0f39eb 100644 --- a/ios/Classes/TiAdmobModule.m +++ b/ios/Classes/TiAdmobModule.m @@ -34,7 +34,7 @@ -(void)startup // you *must* call the superclass [super startup]; - NSLog(@"[INFO] AdMob module loaded",self); + NSLog(@"[DEBUG] Ti.AdMob loaded",self); } -(void)shutdown:(id)sender @@ -69,6 +69,7 @@ -(void)didReceiveMemoryWarning:(NSNotification*)notification MAKE_SYSTEM_STR(SIMULATOR_ID, kGADSimulatorID); MAKE_SYSTEM_PROP(GENDER_MALE, kGADGenderMale); MAKE_SYSTEM_PROP(GENDER_FEMALE, kGADGenderFemale); +MAKE_SYSTEM_PROP(GENDER_UNKNOWN, kGADGenderUnknown); MAKE_SYSTEM_PROP(AD_TYPE_BANNER, TiAdmobAdTypeBanner); MAKE_SYSTEM_PROP(AD_TYPE_INTERSTITIAL, TiAdmobAdTypeInterstitial) diff --git a/ios/Classes/TiAdmobModuleAssets.m b/ios/Classes/TiAdmobModuleAssets.m new file mode 100644 index 00000000..399f189e --- /dev/null +++ b/ios/Classes/TiAdmobModuleAssets.m @@ -0,0 +1,24 @@ +/** + * This is a generated file. Do not edit or your changes will be lost + */ +#import "TiAdmobModuleAssets.h" + +extern NSData* filterDataInRange(NSData* thedata, NSRange range); + +@implementation TiAdmobModuleAssets + +- (NSData*) moduleAsset +{ + + + return nil; +} + +- (NSData*) resolveModuleAsset:(NSString*)path +{ + + + return nil; +} + +@end diff --git a/ios/Classes/TiAdmobView.m b/ios/Classes/TiAdmobView.m index a4de9e42..ee3df6d4 100644 --- a/ios/Classes/TiAdmobView.m +++ b/ios/Classes/TiAdmobView.m @@ -14,7 +14,7 @@ @implementation TiAdmobView #pragma mark - Ad Lifecycle -- (GADRequest*)request +- (GADRequest *)request { if (request == nil) { request = [[GADRequest request] retain]; @@ -23,26 +23,25 @@ - (GADRequest*)request return request; } -- (GADInterstitial*)interstitial +- (GADInterstitial *)interstitial { if (interstitial == nil) { id debugEnabled = [[self proxy] valueForKey:@"debugEnabled"]; id adUnitId = [[self proxy] valueForKey:@"adUnitId"]; - if (debugEnabled != nil && [TiUtils boolValue:debugEnabled def:NO] == YES) { + if (debugEnabled != nil && [TiUtils boolValue:debugEnabled def:NO]) { adUnitId = [self exampleAdId]; } - - [self setBackgroundColor:[UIColor redColor]]; interstitial = [[GADInterstitial alloc] initWithAdUnitID:[TiUtils stringValue:adUnitId]]; [interstitial setDelegate:self]; + [interstitial setInAppPurchaseDelegate:self]; } return interstitial; } -- (GADBannerView*)bannerView +- (GADBannerView *)bannerView { if (bannerView == nil) { // Create the view with dynamic width and height specification. @@ -185,18 +184,20 @@ - (void)setExtras_:(id)args GADExtras *extras = [[GADExtras alloc] init]; [extras setAdditionalParameters:args]; [[self request] registerAdNetworkExtras:extras]; + + RELEASE_TO_NIL(extras); } - (void)setGender_:(id)value { if ([value isKindOfClass:[NSString class]]) { - NSLog(@"[WARN] Ti.Admob: String values for `gender` are deprecated in 2.0.0, use the `GENDER_MALE` or `GENDER_FEMALE` constant instead."); + NSLog(@"[WARN] Ti.Admob: String values for `gender` are deprecated in 2.0.0, use the `GENDER_MALE`, `GENDER_FEMALE` or `GENDER_UNKNOWN` constant instead."); if ([value isEqualToString:@"male"]) { [[self request] setGender:kGADGenderMale]; } else if ([value isEqualToString:@"female"]) { [[self request] setGender:kGADGenderFemale]; - } else { + } else if ([value isEqualToString:@"unknown"]) { [[self request] setGender:kGADGenderUnknown]; } @@ -260,42 +261,57 @@ - (NSString*)exampleAdId return @"ca-app-pub-0123456789012345/0123456789"; } ++ (NSDictionary *)dictionaryFromBannerView:(GADBannerView *)bannerView +{ + return @{ + @"adUnitId": bannerView.adUnitID + }; +} + ++ (NSDictionary *)dictionaryFromInterstitial:(GADInterstitial *)interstitial +{ + return @{ + @"adUnitId": interstitial.adUnitID, + @"isReady": NUMBOOL(interstitial.isReady) + }; +} + #pragma mark - Ad Delegate - (void)adViewDidReceiveAd:(GADBannerView *)view { - [self.proxy fireEvent:@"didReceiveAd"]; + [self.proxy fireEvent:@"didReceiveAd" withObject:[TiAdmobView dictionaryFromBannerView:view]]; } - (void)adView:(GADBannerView *)view didFailToReceiveAdWithError:(GADRequestError *)error { - [self.proxy fireEvent:@"didFailToReceiveAd" withObject:@{@"error":error.localizedDescription}]; + [self.proxy fireEvent:@"didFailToReceiveAd" withObject:@{@"adUnitId": view.adUnitID, @"error":error.localizedDescription}]; } - (void)adViewWillPresentScreen:(GADBannerView *)adView { - [self.proxy fireEvent:@"willPresentScreen"]; + [self.proxy fireEvent:@"willPresentScreen" withObject:[TiAdmobView dictionaryFromBannerView:adView]]; } - (void)adViewWillDismissScreen:(GADBannerView *)adView { - [self.proxy fireEvent:@"willDismissScreen"]; + [self.proxy fireEvent:@"willDismissScreen" withObject:[TiAdmobView dictionaryFromBannerView:adView]]; } - (void)adViewDidDismissScreen:(GADBannerView *)adView { - [self.proxy fireEvent:@"didDismissScreen"]; + [self.proxy fireEvent:@"didDismissScreen" withObject:[TiAdmobView dictionaryFromBannerView:adView]]; } - (void)adViewWillLeaveApplication:(GADBannerView *)adView { - [self.proxy fireEvent:@"willLeaveApplication"]; + [self.proxy fireEvent:@"willLeaveApplication" withObject:[TiAdmobView dictionaryFromBannerView:adView]]; } - (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase { [self.proxy fireEvent:@"didReceiveInAppPurchase" withObject:@{ - @"productID": purchase.productID, + @"productId": purchase.productID, @"quantity": [NSNumber numberWithInteger:purchase.quantity] }]; } @@ -304,34 +320,37 @@ - (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase - (void)interstitialDidReceiveAd:(GADInterstitial *)ad { - [self.proxy fireEvent:@"didReceiveAd" withObject:@{@"isReady": NUMBOOL([[self interstitial] isReady])}]; + [self.proxy fireEvent:@"didReceiveAd" withObject:[TiAdmobView dictionaryFromInterstitial:ad]]; [self showInterstitial]; } - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error { - [self.proxy fireEvent:@"didFailToReceiveAd" withObject:@{@"error":error.localizedDescription}]; + [self.proxy fireEvent:@"didFailToReceiveAd" withObject:@{@"adUnitId": ad.adUnitID, @"error":error.localizedDescription}]; } - (void)interstitialWillPresentScreen:(GADInterstitial *)ad { - [self.proxy fireEvent:@"willPresentScreen"]; + [self.proxy fireEvent:@"willPresentScreen" withObject:[TiAdmobView dictionaryFromInterstitial:ad]]; } - (void)interstitialWillDismissScreen:(GADInterstitial *)ad { - [self.proxy fireEvent:@"willDismissScreen"]; + [self.proxy fireEvent:@"willDismissScreen" withObject:[TiAdmobView dictionaryFromInterstitial:ad]]; } - (void)interstitialDidDismissScreen:(GADInterstitial *)ad { - [self performSelectorOnMainThread:@selector(removeFromSuperview) withObject:nil waitUntilDone:NO]; - [self.proxy fireEvent:@"didDismissScreen"]; + TiThreadPerformOnMainThread(^{ + [self removeFromSuperview]; + }, NO); + + [self.proxy fireEvent:@"didDismissScreen" withObject:[TiAdmobView dictionaryFromInterstitial:ad]]; } - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad { - [self.proxy fireEvent:@"willLeaveApplication"]; + [self.proxy fireEvent:@"willLeaveApplication" withObject:[TiAdmobView dictionaryFromInterstitial:ad]]; } @end diff --git a/ios/admob.xcodeproj/project.pbxproj b/ios/admob.xcodeproj/project.pbxproj index 4ae63178..8543a5f8 100644 --- a/ios/admob.xcodeproj/project.pbxproj +++ b/ios/admob.xcodeproj/project.pbxproj @@ -27,6 +27,15 @@ CE6C17AA1982D1870017C788 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE6C17A91982D1870017C788 /* SystemConfiguration.framework */; }; DAD5D7CF12527E11009CF986 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAD5D7CE12527E11009CF986 /* AudioToolbox.framework */; }; DAD5D7D512527E2F009CF986 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAD5D7D412527E2F009CF986 /* MessageUI.framework */; }; + DB07E8B81E8010000008C1E1 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8B61E8010000008C1E1 /* CoreMedia.framework */; }; + DB07E8B91E8010000008C1E1 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8B71E8010000008C1E1 /* CoreMotion.framework */; }; + DB07E8BB1E80100D0008C1E1 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8BA1E80100D0008C1E1 /* CoreVideo.framework */; }; + DB07E8BD1E80101A0008C1E1 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8BC1E80101A0008C1E1 /* GLKit.framework */; }; + DB07E8BF1E80101F0008C1E1 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8BE1E80101F0008C1E1 /* JavaScriptCore.framework */; }; + DB07E8C01E80103C0008C1E1 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAD5D7D112527E1A009CF986 /* MediaPlayer.framework */; }; + DB07E8C21E80104D0008C1E1 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8C11E80104D0008C1E1 /* MobileCoreServices.framework */; }; + DB07E8C41E8010560008C1E1 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8C31E8010560008C1E1 /* OpenGLES.framework */; }; + DB07E8C61E8010680008C1E1 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB07E8C51E8010680008C1E1 /* SafariServices.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -53,6 +62,14 @@ DAD5D7CE12527E11009CF986 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; DAD5D7D112527E1A009CF986 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; DAD5D7D412527E2F009CF986 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + DB07E8B61E8010000008C1E1 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + DB07E8B71E8010000008C1E1 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + DB07E8BA1E80100D0008C1E1 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + DB07E8BC1E80101A0008C1E1 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + DB07E8BE1E80101F0008C1E1 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + DB07E8C11E80104D0008C1E1 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + DB07E8C31E8010560008C1E1 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + DB07E8C51E8010680008C1E1 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,16 +79,25 @@ files = ( 3A4F268F1C68DDF7003E06CF /* iAd.framework in Frameworks */, 3AC840121C60A7F3002A52E3 /* libAdapterIAd.a in Frameworks */, - 3AEA89BF1C5F727300FBA64B /* GoogleMobileAds.framework in Frameworks */, CE6C17A01982D1170017C788 /* AdSupport.framework in Frameworks */, DAD5D7CF12527E11009CF986 /* AudioToolbox.framework in Frameworks */, CE6C17A21982D12D0017C788 /* AVFoundation.framework in Frameworks */, CE6C17A41982D13A0017C788 /* CoreGraphics.framework in Frameworks */, + DB07E8B81E8010000008C1E1 /* CoreMedia.framework in Frameworks */, + DB07E8B91E8010000008C1E1 /* CoreMotion.framework in Frameworks */, CE6C17A61982D1660017C788 /* CoreTelephony.framework in Frameworks */, + DB07E8BB1E80100D0008C1E1 /* CoreVideo.framework in Frameworks */, + AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */, + DB07E8BD1E80101A0008C1E1 /* GLKit.framework in Frameworks */, + DB07E8BF1E80101F0008C1E1 /* JavaScriptCore.framework in Frameworks */, + DB07E8C01E80103C0008C1E1 /* MediaPlayer.framework in Frameworks */, DAD5D7D512527E2F009CF986 /* MessageUI.framework in Frameworks */, + DB07E8C21E80104D0008C1E1 /* MobileCoreServices.framework in Frameworks */, + DB07E8C41E8010560008C1E1 /* OpenGLES.framework in Frameworks */, + DB07E8C61E8010680008C1E1 /* SafariServices.framework in Frameworks */, CE6C17A81982D1780017C788 /* StoreKit.framework in Frameworks */, CE6C17AA1982D1870017C788 /* SystemConfiguration.framework in Frameworks */, - AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */, + 3AEA89BF1C5F727300FBA64B /* GoogleMobileAds.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,6 +126,14 @@ 0867D69AFE84028FC02AAC07 /* Frameworks */ = { isa = PBXGroup; children = ( + DB07E8C51E8010680008C1E1 /* SafariServices.framework */, + DB07E8C31E8010560008C1E1 /* OpenGLES.framework */, + DB07E8C11E80104D0008C1E1 /* MobileCoreServices.framework */, + DB07E8BE1E80101F0008C1E1 /* JavaScriptCore.framework */, + DB07E8BC1E80101A0008C1E1 /* GLKit.framework */, + DB07E8BA1E80100D0008C1E1 /* CoreVideo.framework */, + DB07E8B61E8010000008C1E1 /* CoreMedia.framework */, + DB07E8B71E8010000008C1E1 /* CoreMotion.framework */, 3A4F268E1C68DDF7003E06CF /* iAd.framework */, 3AC8400F1C60A67D002A52E3 /* iAd Adapter */, CE6C17AB1982D1C90017C788 /* AdMob iOS SDK */, diff --git a/ios/documentation/index.md b/ios/documentation/index.md index 2ddbc488..6434a671 100644 --- a/ios/documentation/index.md +++ b/ios/documentation/index.md @@ -51,6 +51,10 @@ A constant to be passed to the `gender` property to specify a gender if used. A constant to be passed to the `gender` property to specify a gender if used. +### Number GENDER_UNKNOWN + +A constant to be passed to the `gender` property to specify a gender if used. + ## Functions ### Ti.Admob.createView({...}) @@ -64,7 +68,7 @@ parameters[object]: a dictionary object of properties defined in [Ti.Admob.View] #### Example: var ad = Admob.createView({ - top: 0, + bottom: 0, width: 320, // Will calculate the width internally to fit its container if not specified height: 50, debugEnabled: true, // If enabled, a dummy value for `adUnitId` will be used to test @@ -109,6 +113,6 @@ Please direct all questions, feedback, and concerns to [info@appcelerator.com](m ## License -Copyright(c) 2010-2015 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details. +Copyright(c) 2010-Present by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details. -[Ti.Admob.View]: view.html \ No newline at end of file +[Ti.Admob.View]: view.html diff --git a/ios/documentation/view.md b/ios/documentation/view.md index dee62a73..aa5702bb 100644 --- a/ios/documentation/view.md +++ b/ios/documentation/view.md @@ -19,7 +19,7 @@ See the example.js for more infos. ### string adUnitId -The ad Unit ID for admob. +The ad Unit ID for Admob. ### string adBackgroundColor @@ -45,7 +45,7 @@ for determining ad delivery. ### string gender -The user's gender for the purpose of determining ad delivery. This should be one of the constants `GENDER_MALE` or `GENDER_FEMALE`. +The user's gender for the purpose of determining ad delivery. This should be one of the constants `GENDER_MALE`, `GENDER_FEMALE` or `GENDER_UNKNOWN`. ### Array[String] keywords @@ -103,7 +103,8 @@ Sets a testing value for `adUnitId` to test ads without an admob account. Sent when an ad request loaded an ad. This is a good opportunity to add this view to the hierarchy if it has not yet been added. If the ad was received as a part of the server-side auto refreshing, you can examine the - hasAutoRefreshed property of the view. + hasAutoRefreshed property of the view. Use the `adUnitId` property of the callback + to identify the ad that was loaded. ### didFailToReceiveAd diff --git a/ios/example/app.js b/ios/example/app.js index ce0c9fbe..893f31b9 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -9,14 +9,14 @@ var win = Ti.UI.createWindow({ */ var ad1 = Admob.createView({ height: 50, - top: 0, + bottom: 0, debugEnabled: true, // If enabled, a dummy value for `adUnitId` will be used to test adType: Admob.AD_TYPE_BANNER, adUnitId: '<>', // You can get your own at http: //www.admob.com/ adBackgroundColor: 'black', testDevices: [Admob.SIMULATOR_ID], // You can get your device's id by looking in the console log dateOfBirth: new Date(1985, 10, 1, 12, 1, 1), - gender: Admob.GENDER_MALE, // GENDER_MALE or GENDER_FEMALE, default: undefined + gender: Admob.GENDER_MALE, // GENDER_MALE, GENDER_FEMALE or GENDER_UNKNOWN, default: GENDER_UNKNOWN contentURL: 'https://admob.com', // URL string for a webpage whose content matches the app content. requestAgent: 'Titanium Mobile App', // String that identifies the ad request's origin. extras: { @@ -28,27 +28,27 @@ var ad1 = Admob.createView({ }); win.add(ad1); -ad1.addEventListener('didReceiveAd', function() { - alert('Did receive ad!'); +ad1.addEventListener('didReceiveAd', function(e) { + Ti.API.info('Did receive ad: ' + e.adUnitId + '!'); }); ad1.addEventListener('didFailToReceiveAd', function(e) { - alert('Failed to receive ad: ' + e.error); + Ti.API.error('Failed to receive ad: ' + e.error); }); ad1.addEventListener('willPresentScreen', function() { - alert('Presenting screen!'); + Ti.API.info('Presenting screen!'); }); ad1.addEventListener('willDismissScreen', function() { - alert('Dismissing screen!'); + Ti.API.info('Dismissing screen!'); }); ad1.addEventListener('didDismissScreen', function() { - alert('Dismissed screen!'); + Ti.API.info('Dismissed screen!'); }); ad1.addEventListener('willLeaveApplication', function() { - alert('Leaving the app!'); + Ti.API.info('Leaving the app!'); }); ad1.addEventListener('didReceiveInAppPurchase', function(e) { - alert('Did receive an inApp purchase!'); - Ti.API.warn(e); + Ti.API.info('Did receive an In-App purchase: ' + e.productId + '!'); + Ti.API.info(e); }); var btn = Ti.UI.createButton({ @@ -68,11 +68,11 @@ btn.addEventListener('click', function() { ad2.receive(); ad2.addEventListener('didReceiveAd', function(e) { - alert('Did receive ad!'); + Ti.API.info('Did receive ad!'); }); ad2.addEventListener('didFailToReceiveAd', function(e) { - alert('Failed to receive ad: ' + e.error); + Ti.API.error('Failed to receive ad: ' + e.error); }); }); @@ -82,7 +82,7 @@ win.add(Ti.UI.createLabel({ text: 'Loading the ads now! ' + 'Note that there may be a several minute delay ' + 'if you have not viewed an ad in over 24 hours.', - bottom: 40, + top: 40, textAlign: 'center' })); win.open(); diff --git a/ios/manifest b/ios/manifest index eb5c23ae..b2054d0c 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,12 +2,12 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 2.1.0 +version: 2.1.1 architectures: armv7 i386 x86_64 arm64 description: AdMob module for ad delivery via AdMob author: Jeff Haynie, Stephen Tramer, Jasper Kennis, Jon Alter and Hans Knoechel license: Apache License, Version 2.0 -copyright: Copyright (c) 2010-2014 by Appcelerator, Inc. +copyright: Copyright (c) 2010-Present by Appcelerator, Inc. # these should not be edited diff --git a/ios/metadata.json b/ios/metadata.json new file mode 100644 index 00000000..43a62e59 --- /dev/null +++ b/ios/metadata.json @@ -0,0 +1 @@ +{"exports":[]} \ No newline at end of file diff --git a/ios/module.xcconfig b/ios/module.xcconfig index 8268e978..87c4cfa8 100644 --- a/ios/module.xcconfig +++ b/ios/module.xcconfig @@ -2,6 +2,6 @@ // PLACE ANY BUILD DEFINITIONS IN THIS FILE AND THEY WILL BE // PICKED UP DURING THE APP BUILD FOR YOUR MODULE // -FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/ti.admob/2.1.0/platform "~/Library/Application\ Support/Titanium/modules/iphone/ti.admob/2.1.0/platform" +FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/ti.admob/2.1.1/platform "~/Library/Application\ Support/Titanium/modules/iphone/ti.admob/2.1.1/platform" -OTHER_LDFLAGS=$(inherited) -framework AdSupport -framework iAd -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreTelephony -framework MessageUI -framework StoreKit -framework SystemConfiguration -framework GoogleMobileAds \ No newline at end of file +OTHER_LDFLAGS=$(inherited) -framework AdSupport -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework Foundation -framework GLKit -framework JavaScriptCore -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework SafariServices -framework StoreKit -framework SystemConfiguration -framework WebKit -framework GoogleMobileAds diff --git a/ios/platform/GoogleMobileAds.framework/Modules/module.modulemap b/ios/platform/GoogleMobileAds.framework/Modules/module.modulemap index 30206427..f3af92b4 100644 --- a/ios/platform/GoogleMobileAds.framework/Modules/module.modulemap +++ b/ios/platform/GoogleMobileAds.framework/Modules/module.modulemap @@ -9,14 +9,21 @@ framework module GoogleMobileAds { link framework "AVFoundation" link framework "CoreGraphics" link framework "CoreMedia" + link framework "CoreMotion" link framework "CoreTelephony" - link framework "EventKit" - link framework "EventKitUI" + link framework "CoreVideo" link framework "Foundation" + link framework "GLKit" + link framework "JavaScriptCore" + link framework "MediaPlayer" link framework "MessageUI" + link framework "MobileCoreServices" + link framework "OpenGLES" + link framework "SafariServices" link framework "StoreKit" link framework "SystemConfiguration" link framework "UIKit" + link framework "WebKit" header "GoogleMobileAdsDefines.h" @@ -27,14 +34,21 @@ framework module GoogleMobileAds { header "GADBannerViewDelegate.h" header "GADCorrelator.h" header "GADCorrelatorAdLoaderOptions.h" + header "GADDebugOptionsViewController.h" header "GADExtras.h" header "GADInAppPurchase.h" header "GADInAppPurchaseDelegate.h" header "GADInterstitial.h" header "GADInterstitialDelegate.h" + header "GADMediaView.h" header "GADMobileAds.h" + header "GADNativeExpressAdView.h" + header "GADNativeExpressAdViewDelegate.h" header "GADRequest.h" header "GADRequestError.h" + header "GADVideoController.h" + header "GADVideoControllerDelegate.h" + header "GADVideoOptions.h" header "DFPBannerView.h" header "DFPCustomRenderedAd.h" @@ -49,6 +63,7 @@ framework module GoogleMobileAds { header "GADAdLoaderAdTypes.h" header "GADAdLoaderDelegate.h" + header "GADAdChoicesView.h" header "GADNativeAd.h" header "GADNativeAdDelegate.h" header "GADNativeAdImage.h" @@ -58,6 +73,7 @@ framework module GoogleMobileAds { header "GADNativeCustomTemplateAd.h" header "GADNativeAdImageAdLoaderOptions.h" + header "GADNativeAdViewAdOptions.h" header "GADCustomEventBanner.h" header "GADCustomEventBannerDelegate.h" @@ -66,6 +82,7 @@ framework module GoogleMobileAds { header "GADCustomEventInterstitialDelegate.h" header "GADCustomEventNativeAd.h" header "GADCustomEventNativeAdDelegate.h" + header "GADCustomEventParameters.h" header "GADCustomEventRequest.h" header "GADMediatedNativeAd.h" header "GADMediatedNativeAdDelegate.h" @@ -73,10 +90,18 @@ framework module GoogleMobileAds { header "GADMediatedNativeAppInstallAd.h" header "GADMediatedNativeContentAd.h" + header "GADDynamicHeightSearchRequest.h" header "GADSearchBannerView.h" header "GADSearchRequest.h" header "GADAdReward.h" header "GADRewardBasedVideoAd.h" header "GADRewardBasedVideoAdDelegate.h" + + header "Mediation/GADMAdNetworkAdapterProtocol.h" + header "Mediation/GADMAdNetworkConnectorProtocol.h" + header "Mediation/GADMediationAdRequest.h" + header "Mediation/GADMEnums.h" + header "Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h" + header "Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h" } diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/GoogleMobileAds b/ios/platform/GoogleMobileAds.framework/Versions/A/GoogleMobileAds index 9053c4f7..546d8b4d 100644 Binary files a/ios/platform/GoogleMobileAds.framework/Versions/A/GoogleMobileAds and b/ios/platform/GoogleMobileAds.framework/Versions/A/GoogleMobileAds differ diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h index f2b85ce3..95e0f7c0 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h @@ -5,13 +5,14 @@ // Copyright 2012 Google Inc. All rights reserved. // +#import +#import #import #import +#import #import -@protocol DFPCustomRenderedBannerViewDelegate; -@protocol GADAdSizeDelegate; -@protocol GADAppEventDelegate; +GAD_ASSUME_NONNULL_BEGIN /// The view that displays DoubleClick For Publishers banner ads. @interface DFPBannerView : GADBannerView @@ -21,61 +22,73 @@ /// for targeting and statistics. /// /// Example DFP ad unit ID: @"/6499/example/banner" -@property(nonatomic, copy) NSString *adUnitID; +@property(nonatomic, copy, GAD_NULLABLE) NSString *adUnitID; /// Optional delegate that is notified when creatives send app events. -@property(nonatomic, weak) IBOutlet id appEventDelegate; +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id appEventDelegate; /// Optional delegate that is notified when creatives cause the banner to change size. -@property(nonatomic, weak) IBOutlet id adSizeDelegate; +@property(nonatomic, weak, GAD_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. /// -/// \see setValidAdSizesWithSizes: -/// /// Example: -/// \code +/// +///
 ///   NSArray *validSizes = @[
 ///     NSValueFromGADAdSize(kGADAdSizeBanner),
 ///     NSValueFromGADAdSize(kGADAdSizeLargeBanner)
 ///   ];
 ///
 ///   bannerView.validAdSizes = validSizes;
-///   \endcode
-@property(nonatomic, copy) NSArray *validAdSizes;
+///   
+@property(nonatomic, copy, GAD_NULLABLE) NSArray *validAdSizes; /// Correlator object for correlating this object to other ad objects. -@property(nonatomic, strong) GADCorrelator *correlator; +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; /// Indicates that the publisher will record impressions manually when the ad becomes visible to the /// user. @property(nonatomic, assign) BOOL enableManualImpressions; /// Optional delegate object for custom rendered ads. -@property(nonatomic, weak) +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id customRenderedBannerViewDelegate; +/// Video controller for controlling video rendered by this ad view. +@property(nonatomic, strong, readonly) 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:(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. /// /// Example: -/// \code +/// +///
 ///   GADAdSize size1 = kGADAdSizeBanner;
 ///   GADAdSize size2 = kGADAdSizeLargeBanner;
 ///   [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL];
-///   \endcode
+///   
- (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h index c4543cc8..5c2b0abb 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h @@ -7,14 +7,18 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// Custom rendered ad. Your application renders the ad. @interface DFPCustomRenderedAd : NSObject /// The ad's HTML. -@property(nonatomic, copy, readonly) NSString *adHTML; +@property(nonatomic, readonly, copy) NSString *adHTML; /// The base URL of the ad's HTML. -@property(nonatomic, copy, readonly) NSURL *adBaseURL; +@property(nonatomic, readonly, copy) NSURL *adBaseURL; /// Call this method when the user clicks the ad. - (void)recordClick; @@ -26,3 +30,5 @@ - (void)finishedRenderingAdView:(UIView *)view; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h index 59f1965e..e15b89eb 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h @@ -7,14 +7,22 @@ #import +#import + @class DFPBannerView; @class DFPCustomRenderedAd; +GAD_ASSUME_NONNULL_BEGIN + +/// The DFPCustomRenderedAd banner view delegate protocol for notifying the delegate of changes to +/// custom rendered banners. @protocol DFPCustomRenderedBannerViewDelegate /// Called after ad data has been received. You must construct a banner from |customRenderedAd| and -/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad is rendered. +/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad has been rendered. - (void)bannerView:(DFPBannerView *)bannerView didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h index fda75a2e..0f1f4a8a 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h @@ -7,9 +7,15 @@ #import +#import + @class DFPCustomRenderedAd; @class DFPInterstitial; +GAD_ASSUME_NONNULL_BEGIN + +/// The DFPCustomRenderedAd interstitial delegate protocol for notifying the delegate of changes to +/// custom rendered interstitials. @protocol DFPCustomRenderedInterstitialDelegate /// Called after ad data has been received. You must construct an interstitial from @@ -19,3 +25,5 @@ didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h index 27112eb4..e3af0d21 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h @@ -5,12 +5,16 @@ // Copyright 2012 Google Inc. All rights reserved. // +#import +#import #import #import +#import -@protocol DFPCustomRenderedInterstitialDelegate; -@protocol GADAppEventDelegate; +GAD_ASSUME_NONNULL_BEGIN +/// DoubleClick For Publishers 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 /// Required value created on the DFP website. Create a new ad unit for every unique placement of an @@ -21,13 +25,15 @@ @property(nonatomic, readonly, copy) NSString *adUnitID; /// Correlator object for correlating this object to other ad objects. -@property(nonatomic, strong) GADCorrelator *correlator; +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; /// Optional delegate that is notified when creatives send app events. -@property(nonatomic, weak) id appEventDelegate; +@property(nonatomic, weak, GAD_NULLABLE) id appEventDelegate; /// Optional delegate object for custom rendered ads. -@property(nonatomic, weak) +@property(nonatomic, weak, GAD_NULLABLE) id customRenderedInterstitialDelegate; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h index 5d41aeac..08f070f1 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h @@ -10,6 +10,8 @@ #import #import +GAD_ASSUME_NONNULL_BEGIN + /// Add this constant to the testDevices property's array to receive test ads on the simulator. GAD_EXTERN const id kDFPSimulatorID; @@ -17,17 +19,19 @@ GAD_EXTERN const id kDFPSimulatorID; @interface DFPRequest : GADRequest /// Publisher provided user ID. -@property(nonatomic, copy) NSString *publisherProvidedID; +@property(nonatomic, copy, GAD_NULLABLE) NSString *publisherProvidedID; /// Array of strings used to exclude specified categories in ad results. -@property(nonatomic, copy) NSArray *categoryExclusions; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *categoryExclusions; /// Key-value pairs used for custom targeting. -@property(nonatomic, copy) NSDictionary *customTargeting; +@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *customTargeting; /// This API is deprecated and a no-op, use an instance of GADCorrelator set on DFPInterstitial or /// DFPBannerView objects to correlate requests. + (void)updateCorrelator GAD_DEPRECATED_MSG_ATTRIBUTE( - "Set GADCorrelator objects on your ads instead. This method longer affects ad correlation."); + "Set GADCorrelator objects on your ads instead. This method no longer affects ad correlation."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h new file mode 100644 index 00000000..c05aeb53 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h @@ -0,0 +1,23 @@ +// +// GADAdChoicesView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Displays AdChoices content. +/// +/// If a GADAdChoicesView is set on GADNativeAppInstallAdView or GADNativeContentAdView prior to +/// calling -setNativeAppInstallAd: or -setNativeContentAd:, AdChoices content will render inside +/// the GADAdChoicesView. By default, AdChoices is placed in the top right corner of +/// GADNativeAppInstallAdView and GADNativeContentAdView. +@interface GADAdChoicesView : UIView +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h index 77d9fb09..27cdda03 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdDelegate.h @@ -5,6 +5,10 @@ // Copyright 2015 Google Inc. All rights reserved. // +#import + +GAD_ASSUME_NONNULL_BEGIN + #pragma mark - Audio Control Notifications /// Delegate methods common to multiple ad types. @@ -20,3 +24,5 @@ - (BOOL)ad:(id)ad shouldChangeAudioSessionToCategory:(NSString *)audioSessionCategory; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h index 673fce95..44ee5c57 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h @@ -8,31 +8,36 @@ #import #import -#import "GADAdLoaderDelegate.h" -#import "GADRequest.h" -#import "GADRequestError.h" +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN /// 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) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// The ad loader's ad unit ID. +@property(nonatomic, readonly) NSString *adUnitID; /// 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. Cannot -/// be nil. +/// @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. - (instancetype)initWithAdUnitID:(NSString *)adUnitID - rootViewController:(UIViewController *)rootViewController + rootViewController:(UIViewController *GAD_NULLABLE_TYPE)rootViewController adTypes:(NSArray *)adTypes - options:(NSArray *)options; + options:(NSArray *GAD_NULLABLE_TYPE)options; /// Loads the ad and informs the delegate of the outcome. -- (void)loadRequest:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; @end @@ -40,3 +45,5 @@ /// subclasses. @interface GADAdLoaderOptions : NSObject @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h index 1b1eaeb7..76d17623 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h @@ -9,14 +9,23 @@ #import -// For use with GADAdLoader's creation methods. See the constants' respective headers for each ad -// type's delegate requirements. +GAD_ASSUME_NONNULL_BEGIN -/// Native app install ad type. \see GADNativeAppInstallAd.h. +/// Use with GADAdLoader to request native app install ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeAppInstallAdRequestDelegate protocol. See GADNativeAppInstallAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; -/// Native content ad type. \see GADNativeContentAd.h. +/// Use with GADAdLoader to request native content ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeContentAdRequestDelegate protocol. See GADNativeContentAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; -/// Native custom template ad type. \see GADNativeCustomTemplateAd.h. +/// 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 NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h index 1be88843..dec90b78 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h @@ -7,10 +7,13 @@ #import -#import "GADRequestError.h" +#import +#import @class GADAdLoader; +GAD_ASSUME_NONNULL_BEGIN + /// Base ad loader delegate protocol. Ad types provide extended protocols that declare methods to /// handle successful ad loads. @protocol GADAdLoaderDelegate @@ -19,3 +22,5 @@ - (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h index d33de74b..55c62f13 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h @@ -7,6 +7,10 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// An object implementing this protocol contains information set by the publisher on the client /// device for a particular ad network. /// @@ -14,3 +18,5 @@ /// use. @protocol GADAdNetworkExtras @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h index 5657a21d..38aeefb5 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h @@ -7,6 +7,11 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Reward information for GADRewardBasedVideoAd ads. @interface GADAdReward : NSObject /// Type of the reward. @@ -21,3 +26,5 @@ rewardAmount:(NSDecimalNumber *)rewardAmount NS_DESIGNATED_INITIALIZER; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h index 32efccd6..c92b767d 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h @@ -10,6 +10,8 @@ #import +GAD_ASSUME_NONNULL_BEGIN + /// A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSize /// constructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight, /// GADAdSizeFullWidthLandscapeWithHeight. @@ -17,10 +19,15 @@ /// 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 GADAdSize { - CGSize size; - NSUInteger flags; -} GADAdSize; +typedef struct GAD_BOXABLE GADAdSize GADAdSize; + +/// Ad size. +/// +/// @see typedef GADAdSize +struct GAD_BOXABLE GADAdSize { + CGSize size; ///< The ad size. Don't modify this value directly. + NSUInteger flags; ///< Reserved. +}; #pragma mark Standard Sizes @@ -63,37 +70,40 @@ GAD_EXTERN GADAdSize const kGADAdSizeInvalid; /// 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. -GADAdSize GADAdSizeFromCGSize(CGSize size); +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. -GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height); +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. -GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); +GAD_EXTERN GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); #pragma mark Convenience Functions /// Returns YES if the two GADAdSizes are equal, otherwise returns NO. -BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); +GAD_EXTERN BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); /// Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returns /// CGSizeZero. -CGSize CGSizeFromGADAdSize(GADAdSize size); +GAD_EXTERN CGSize CGSizeFromGADAdSize(GADAdSize size); /// Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated by /// GADAdSizeFromCGSize. -BOOL IsGADAdSizeValid(GADAdSize size); +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. -NSString *NSStringFromGADAdSize(GADAdSize size); +GAD_EXTERN NSString *NSStringFromGADAdSize(GADAdSize size); /// Returns an NSValue representing the GADAdSize. -NSValue *NSValueFromGADAdSize(GADAdSize size); +GAD_EXTERN NSValue *NSValueFromGADAdSize(GADAdSize size); /// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize. -GADAdSize GADAdSizeFromNSValue(NSValue *value); +GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *value); #pragma mark Deprecated Macros @@ -103,3 +113,5 @@ GADAdSize GADAdSizeFromNSValue(NSValue *value); #define GAD_SIZE_468x60 CGSizeFromGADAdSize(kGADAdSizeFullBanner) #define GAD_SIZE_728x90 CGSizeFromGADAdSize(kGADAdSizeLeaderboard) #define GAD_SIZE_120x600 CGSizeFromGADAdSize(kGADAdSizeSkyscraper) + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h index 324a571f..ce82adce 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h @@ -8,9 +8,12 @@ #import #import +#import @class GADBannerView; +GAD_ASSUME_NONNULL_BEGIN + /// The class implementing this protocol will be notified when the DFPBannerView changes ad size. /// Any views that may be affected by the banner size change will have time to adjust. @protocol GADAdSizeDelegate @@ -19,3 +22,5 @@ - (void)adView:(GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h index 34fbccec..a9f79cf1 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h @@ -7,9 +7,13 @@ #import +#import + @class GADBannerView; @class GADInterstitial; +GAD_ASSUME_NONNULL_BEGIN + /// 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 @@ -19,11 +23,13 @@ /// Called when the banner receives an app event. - (void)adView:(GADBannerView *)banner didReceiveAppEvent:(NSString *)name - withInfo:(NSString *)info; + withInfo:(NSString *GAD_NULLABLE_TYPE)info; /// Called when the interstitial receives an app event. - (void)interstitial:(GADInterstitial *)interstitial didReceiveAppEvent:(NSString *)name - withInfo:(NSString *)info; + withInfo:(NSString *GAD_NULLABLE_TYPE)info; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h index eace1098..a93a71b1 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h @@ -8,42 +8,38 @@ #import #import +#import #import #import #import #import #import -#ifndef IBInspectable -#define IBInspectable -#endif +GAD_ASSUME_NONNULL_BEGIN /// The view that displays banner ads. A minimum implementation to get an ad from within a /// UIViewController class is: /// -/// \code +///
 ///   // Create and setup the ad view, specifying the size and origin at {0, 0}.
 ///   GADBannerView *adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
 ///   adView.rootViewController = self;
 ///   adView.adUnitID = @"ID created when registering your app";
-///
 ///   // Place the ad view onto the screen.
 ///   [self.view addSubview:adView];
-///
 ///   // Request an ad without any additional targeting information.
 ///   [adView loadRequest:[GADRequest request]];
-///   \endcode
-///
+///   
@interface GADBannerView : UIView #pragma mark Initialization -/// Initializes a GADBannerView and sets it to the specified size, and specifies its placement -/// within its superview bounds. Returns nil if |adSize| is an invalid ad size. +/// Initializes and returns a banner view with the specified ad size and origin relative to the +/// banner's superview. - (instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; -/// Initializes a GADBannerView and sets it to the specified size, and specifies its placement at -/// the top left of its superview. Returns nil if |adSize| is an invalid ad size. +/// Initializes and returns a banner view with the specified ad size placed at its superview's +/// origin. - (instancetype)initWithAdSize:(GADAdSize)adSize; #pragma mark Pre-Request @@ -53,11 +49,11 @@ /// important for targeting and statistics. /// /// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" -@property(nonatomic, copy) IBInspectable NSString *adUnitID; +@property(nonatomic, copy, GAD_NULLABLE) IBInspectable NSString *adUnitID; /// Required reference to the current root view controller. For example the root view controller in /// tab-based application would be the UITabViewController. -@property(nonatomic, weak) IBOutlet UIViewController *rootViewController; +@property(nonatomic, weak, GAD_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 @@ -68,16 +64,20 @@ /// Optional delegate object that receives state change notifications from this GADBannerView. /// Typically this is a UIViewController. -@property(nonatomic, weak) IBOutlet id delegate; +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id delegate; /// Optional delegate object that receives in-app purchase notifications from this ad. Required for /// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. -@property(nonatomic, weak) IBOutlet id inAppPurchaseDelegate; +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id inAppPurchaseDelegate; + +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; #pragma mark Making an Ad Request /// Makes an ad request. The request object supplies targeting information. -- (void)loadRequest:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)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. @@ -87,9 +87,9 @@ /// 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 method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom -/// events, this method returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, copy) NSString *adNetworkClassName; +/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom +/// events, this property returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; #pragma mark Deprecated @@ -100,7 +100,9 @@ /// 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) +@property(nonatomic, readonly, weak, GAD_NULLABLE) UIView *mediatedAdView GAD_DEPRECATED_MSG_ATTRIBUTE("Use adNetworkClassName."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h index e4bee35b..f977bc47 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h @@ -8,10 +8,13 @@ #import #import +#import @class GADBannerView; @class GADRequestError; +GAD_ASSUME_NONNULL_BEGIN + /// Delegate methods for receiving GADBannerView state change messages such as ad request status /// and ad click lifecycle. @protocol GADBannerViewDelegate @@ -47,3 +50,5 @@ - (void)adViewWillLeaveApplication:(GADBannerView *)bannerView; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h index 268c2ae6..909f0f4c 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h @@ -7,6 +7,10 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// Represents a correlation between multiple ads. Set an instance of this object on multiple ads to /// indicate they are being used in a common context. @interface GADCorrelator : NSObject @@ -15,3 +19,5 @@ - (void)reset; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h index 65df4e8b..b10d6075 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h @@ -7,11 +7,16 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Ad loader options for adding a correlator to a native ad request. @interface GADCorrelatorAdLoaderOptions : GADAdLoaderOptions /// Correlator object for correlating ads loaded by an ad loader to other ad objects. -@property(nonatomic, strong) GADCorrelator *correlator; +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h index b8ac29a7..53317d90 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h @@ -10,6 +10,9 @@ #import #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// The banner custom event protocol. Your banner custom event handler must implement this protocol. @protocol GADCustomEventBanner @@ -18,17 +21,20 @@ /// /// 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) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; /// 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. +/// +/// @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:(NSString *)serverParameter - label:(NSString *)serverLabel + parameter:(NSString *GAD_NULLABLE_TYPE)serverParameter + label:(NSString *GAD_NULLABLE_TYPE)serverLabel request:(GADCustomEventRequest *)request; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h index 271489fd..8ec685c5 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h @@ -10,6 +10,8 @@ #import +GAD_ASSUME_NONNULL_BEGIN + @protocol GADCustomEventBanner; /// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: @@ -25,7 +27,8 @@ /// 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:(id)customEvent didFailAd:(NSError *)error; +- (void)customEventBanner:(id)customEvent + didFailAd:(NSError *GAD_NULLABLE_TYPE)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 @@ -55,8 +58,11 @@ #pragma mark Deprecated +/// Deprecated. Use customEventBannerWasClicked:. - (void)customEventBanner:(id)customEvent clickDidOccurInAd:(UIView *)view GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h index 3ebe81e1..a42a35cc 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h @@ -8,6 +8,9 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// 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 @@ -16,10 +19,10 @@ /// Set additional parameters for the custom event with label |label|. To remove additional /// parameters associated with |label|, pass in nil for |extras|. -- (void)setExtras:(NSDictionary *)extras forLabel:(NSString *)label; +- (void)setExtras:(NSDictionary *GAD_NULLABLE_TYPE)extras forLabel:(NSString *)label; /// Retrieve the extras for |label|. -- (NSDictionary *)extrasForLabel:(NSString *)label; +- (NSDictionary *GAD_NULLABLE_TYPE)extrasForLabel:(NSString *)label; /// Removes all the extras set on this instance. - (void)removeAllExtras; @@ -28,3 +31,5 @@ - (NSDictionary *)allExtras; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h index 0eb8fddc..7a05e3bd 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h @@ -9,6 +9,9 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// The interstitial custom event protocol. Your interstitial custom event handler must implement /// this protocol. @@ -18,16 +21,17 @@ /// /// 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) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; /// 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:(NSString *)serverParameter - label:(NSString *)serverLabel +/// +/// @param serverParameter Parameter configured in the mediation UI. +/// @param serverLabel Label configured in the mediation UI. +/// @param request Contains ad request information. +- (void)requestInterstitialAdWithParameter:(NSString *GAD_NULLABLE_TYPE)serverParameter + label:(NSString *GAD_NULLABLE_TYPE)serverLabel request:(GADCustomEventRequest *)request; /// Present the interstitial ad as a modal view using the provided view controller. Called only @@ -35,3 +39,5 @@ - (void)presentFromRootViewController:(UIViewController *)rootViewController; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h index 13fb963c..97219d3e 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h @@ -9,6 +9,8 @@ #import +GAD_ASSUME_NONNULL_BEGIN + @protocol GADCustomEventInterstitial; /// Call back to this delegate in your custom event. You must call @@ -26,7 +28,7 @@ /// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if /// not available. - (void)customEventInterstitial:(id)customEvent - didFailAd:(NSError *)error; + didFailAd:(NSError *GAD_NULLABLE_TYPE)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 @@ -49,8 +51,12 @@ - (void)customEventInterstitialWillLeaveApplication:(id)customEvent; #pragma mark Deprecated + +/// Deprecated. Use customEventInterstitialDidReceiveAd:. - (void)customEventInterstitial:(id)customEvent didReceiveAd:(NSObject *)ad GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h index 7f4c83a0..9a99c7e4 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h @@ -7,30 +7,52 @@ #import -#import "GADCustomEventRequest.h" +#import +#import + +GAD_ASSUME_NONNULL_BEGIN @protocol GADCustomEventNativeAdDelegate; -/// The protocol for a custom event for a native ad. Your custom event handler object for native ads -/// must implement this protocol. The -/// requestNativeAdWithParameter:request:adTypes:options:rootViewController: method will be called -/// when mediation schedules your custom event to be executed. +/// Native ad custom event protocol. Your native ad custom event handler class must conform to this +/// protocol. @protocol GADCustomEventNativeAd -/// This method is called by mediation when your custom event is scheduled to be executed. -/// |serverParameter| is the parameter configured in the mediation UI for the custom event. -/// |request| contains ad targeting information. |adTypes| contains the list of native ad types -/// requested. See GADAdLoaderAdTypes.h for available ad types. |options| are any additional options -/// configured by the publisher for requesting a native ad. See GADNativeAdImageAdLoaderOptions.h -/// for available image options. |rootViewController| is the view controller provided by the -/// publisher. +/// 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:(NSString *)serverParameter request:(GADCustomEventRequest *)request adTypes:(NSArray *)adTypes options:(NSArray *)options rootViewController:(UIViewController *)rootViewController; -/// The delegate object, used for receiving custom native ad load request progress. -@property(nonatomic, weak) id delegate; +/// Indicates if 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 -[GADMediatedNativeAdDelegate +/// mediatedNativeAd:didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if 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 -[GADMediatedNativeAdDelegate mediatedNativeAdDidRecordImpression:]. +- (BOOL)handlesUserImpressions; + +/// Delegate object used for receiving custom native ad load request progress. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h index 4f1f79a8..19029a3c 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h @@ -9,6 +9,9 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// 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 @@ -24,3 +27,5 @@ didFailToLoadWithError:(NSError *)error; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h new file mode 100644 index 00000000..084155d6 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h @@ -0,0 +1,19 @@ +// +// GADCustomEventParameters.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Key for getting the server parameter configured in AdMob when mediating to a custom event +/// adapter. +/// Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer]. +extern NSString *const GADCustomEventParametersServer; + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h index 75fe69b4..cf48be3a 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h @@ -8,40 +8,52 @@ #import #import +#import @class GADCustomEventExtras; +GAD_ASSUME_NONNULL_BEGIN + +/// 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 -/// The end user's gender set in GADRequest. If not specified, returns kGADGenderUnknown. +/// User's gender set in GADRequest. If not specified, returns kGADGenderUnknown. @property(nonatomic, readonly, assign) GADGender userGender; -/// The end user's birthday set in GADRequest. If not specified, returns nil. -@property(nonatomic, readonly, copy) NSDate *userBirthday; +/// User's birthday set in GADRequest. If not specified, returns nil. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDate *userBirthday; -/// The end user's latitude, longitude, and accuracy, set in GADRequest. If not specified, -/// userHasLocation returns NO, and userLatitude, userLongitude and userLocationAccuracyInMeters -/// will all return 0. +/// 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) NSString *userLocationDescription; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *userLocationDescription; /// Keywords set in GADRequest. Returns nil if no keywords are set. -@property(nonatomic, readonly, copy) NSArray *userKeywords; +@property(nonatomic, readonly, copy, GAD_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) NSDictionary *additionalParameters; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDictionary *additionalParameters; /// Indicates if the testing property has been set in GADRequest. @property(nonatomic, readonly, assign) BOOL isTesting; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDebugOptionsViewController.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDebugOptionsViewController.h new file mode 100644 index 00000000..acc98dc3 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDebugOptionsViewController.h @@ -0,0 +1,36 @@ +// +// GADDebugOptionsViewController.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +#import + +@class GADDebugOptionsViewController; + +GAD_ASSUME_NONNULL_BEGIN + +/// Delegate for the GADDebugOptionsViewController. +@protocol GADDebugOptionsViewControllerDelegate +/// Called when the debug options flow is finished. +- (void)debugOptionsViewControllerDidDismiss:(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 DFP account that is being configured with debug options. ++ (instancetype)debugOptionsViewControllerWithAdUnitID:(NSString *)adUnitID; + +/// Delegate for the debug options view controller. +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id delegate; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h new file mode 100644 index 00000000..4fefe66f --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h @@ -0,0 +1,165 @@ +// +// GADDynamicHeightSearchRequest.h +// GoogleMobileAds +// +// Copyright © 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// 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, GAD_NULLABLE) NSString *query; + +/// The CSA "adPage" parameter. +@property(nonatomic, assign) NSInteger adPage; + +#pragma mark Configuration Settings + +/// Indicates if the CSA "adTest" parameter is enabled. +@property(nonatomic, assign) BOOL adTestEnabled; + +/// The CSA "channel" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *channel; + +/// The CSA "hl" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *hostLanguage; + +#pragma mark Layout and Styling + +/// The CSA "colorLocation" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *locationExtensionTextColor; + +/// The CSA "fontSizeLocation" parameter. +@property(nonatomic, assign) CGFloat locationExtensionFontSize; + +#pragma mark Ad Extensions + +/// Indicates if the CSA "clickToCall" parameter is enabled. +@property(nonatomic, assign) BOOL clickToCallExtensionEnabled; + +/// Indicates if the CSA "location" parameter is enabled. +@property(nonatomic, assign) BOOL locationExtensionEnabled; + +/// Indicates if the CSA "plusOnes" parameter is enabled. +@property(nonatomic, assign) BOOL plusOnesExtensionEnabled; + +/// Indicates if the CSA "sellerRatings" parameter is enabled. +@property(nonatomic, assign) BOOL sellerRatingsExtensionEnabled; + +/// Indicates if 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, GAD_NULLABLE) NSString *CSSWidth; + +/// Configuration Settings + +/// The CSA "number" parameter. +@property(nonatomic, assign) NSInteger numberOfAds; + +#pragma mark Font + +/// The CSA "fontFamily" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *fontFamily; + +/// The CSA "fontFamilyAttribution" parameter. +@property(nonatomic, copy, GAD_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, GAD_NULLABLE) NSString *adBorderColor; + +/// The CSA "colorAdSeparator" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *adSeparatorColor; + +/// The CSA "colorAnnotation" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *annotationTextColor; + +/// The CSA "colorAttribution" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *attributionTextColor; + +/// The CSA "colorBackground" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *backgroundColor; + +/// The CSA "colorBorder" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *borderColor; + +/// The CSA "colorDomainLink" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *domainLinkColor; + +/// The CSA "colorText" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *textColor; + +/// The CSA "colorTitleLink" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *titleLinkColor; + +#pragma mark General Formatting + +/// The CSA "adBorderSelections" parameter. +@property(nonatomic, copy, GAD_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, GAD_NULLABLE) NSString *borderCSSSelections; + +/// Indicates if the CSA "noTitleUnderline" parameter is enabled. +@property(nonatomic, assign) BOOL titleUnderlineHidden; + +/// Indicates if 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 if the CSA "detailedAttribution" parameter is enabled. +@property(nonatomic, assign) BOOL detailedAttributionExtensionEnabled; + +/// Indicates if the CSA "longerHeadlines" parameter is enabled. +@property(nonatomic, assign) BOOL longerHeadlinesExtensionEnabled; + +/// Sets an advanced option value for a specified key. The value must be an NSString or NSNumber. +- (void)setAdvancedOptionValue:(id)value forKey:(NSString *)key; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h index 80a354a4..3ca160fa 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h @@ -8,10 +8,16 @@ #import #import +#import +GAD_ASSUME_NONNULL_BEGIN + +/// Ad network extras sent to Google networks. @interface GADExtras : NSObject /// Additional parameters to be sent to Google networks. -@property(nonatomic, copy) NSDictionary *additionalParameters; +@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *additionalParameters; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h index bd8d922e..07fc206f 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h @@ -8,6 +8,10 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + @protocol GADDefaultInAppPurchaseDelegate; #pragma mark - Default Purchase Flow @@ -78,3 +82,5 @@ typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { - (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h index 6dee2442..fe1d8f94 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h @@ -7,9 +7,13 @@ #import +#import + @class GADDefaultInAppPurchase; @class GADInAppPurchase; +GAD_ASSUME_NONNULL_BEGIN + #pragma mark - Default Purchase Flow /// In-app purchase delegate protocol for default purchase handling. The delegate must deliver @@ -40,3 +44,5 @@ - (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h index c53319c6..cb17be99 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h @@ -13,6 +13,8 @@ #import #import +GAD_ASSUME_NONNULL_BEGIN + /// 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. @interface GADInterstitial : NSObject @@ -27,14 +29,14 @@ #pragma mark Pre-Request /// Required value passed in with initWithAdUnitID:. -@property(nonatomic, readonly, copy) NSString *adUnitID; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adUnitID; /// Optional delegate object that receives state change notifications from this GADInterstitalAd. -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; /// Optional delegate object that receives in-app purchase notifications from this ad. Required for /// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. -@property(nonatomic, weak) id inAppPurchaseDelegate; +@property(nonatomic, weak, GAD_NULLABLE) id inAppPurchaseDelegate; #pragma mark Making an Ad Request @@ -44,7 +46,7 @@ /// 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:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; #pragma mark Post-Request @@ -58,9 +60,9 @@ /// Returns 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 method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation -/// custom events, this method returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, copy) NSString *adNetworkClassName; +/// AdMob ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this property returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; /// 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: @@ -78,7 +80,9 @@ - (instancetype)init GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID:."); /// Deprecated setter, use initWithAdUnitID: instead. -- (void)setAdUnitID:(NSString *)adUnitID +- (void)setAdUnitID:(NSString *GAD_NULLABLE_TYPE)adUnitID GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID: instead of setting the ad unit ID."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h index 9f31d4ca..e83fcf9c 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h @@ -8,10 +8,13 @@ #import #import +#import @class GADInterstitial; @class GADRequestError; +GAD_ASSUME_NONNULL_BEGIN + /// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad /// requests succeeding/failing. @protocol GADInterstitialDelegate @@ -36,6 +39,9 @@ /// Store from a link on the interstitial). - (void)interstitialWillPresentScreen:(GADInterstitial *)ad; +/// Called when |ad| fails to present. +- (void)interstitialDidFailToPresentScreen:(GADInterstitial *)ad; + /// Called before the interstitial is to be animated off the screen. - (void)interstitialWillDismissScreen:(GADInterstitial *)ad; @@ -49,3 +55,5 @@ - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h new file mode 100644 index 00000000..d08b4e78 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h @@ -0,0 +1,27 @@ +// +// GADMediaView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Displays native ad media assets. +/// +/// To display media assets in GADNativeAppInstallAdView instances, add a GADMediaView subview and +/// assign the native ad view's mediaView property. +/// +/// If the native ad doesn't contain a video and image loading is enabled, the GADMediaView displays +/// the native ad's |images| asset's first image. +/// +/// If the native ad doesn't contain a video and image loading is disabled, the GADMediaView object +/// is empty. +@interface GADMediaView : UIView +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h index 868b6405..7f37ae26 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h @@ -6,16 +6,22 @@ // #import + #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Base protocol for mediated native ads. @protocol GADMediatedNativeAd /// Returns a delegate object that receives state change notifications. -- (id)mediatedNativeAdDelegate; +- (nullable id)mediatedNativeAdDelegate; /// Returns a dictionary of asset names and object pairs for assets that are not handled by /// properties of the GADMediatedNativeAd subclass. -- (NSDictionary *)extraAssets; +- (NSDictionary *GAD_NULLABLE_TYPE)extraAssets; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h index 716e2835..b705652e 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h @@ -8,6 +8,10 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + @protocol GADMediatedNativeAd; /// GADMediatedNativeAdDelegate objects handle mediated native ad events. @@ -15,18 +19,29 @@ @optional -/// Tells the delegate that the mediated native ad has rendered in |view|. -- (void)mediatedNativeAd:(id)mediatedNativeAd didRenderInView:(UIView *)view; +/// Tells the delegate that the mediated native ad has rendered in |view|, a subview of +/// |viewController|. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRenderInView:(UIView *)view + viewController:(UIViewController *)viewController; /// Tells the delegate that the mediated native ad has recorded an impression. This method is called /// only once per mediated native ad. - (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; /// Tells the delegate that the mediated native ad has recorded a user click on the asset named -/// |assetName|. Full screen actions should be presented from |viewController|. +/// |assetName|. Full screen actions should be presented from |viewController|. This method is +/// called only if -[GADMAdNetworkAdapter handlesUserClicks] returns NO. - (void)mediatedNativeAd:(id)mediatedNativeAd didRecordClickOnAssetWithName:(NSString *)assetName view:(UIView *)view viewController:(UIViewController *)viewController; +/// Tells the delegate that the mediated native ad has untracked |view|. This method is called +/// when the mediatedNativeAd is no longer rendered in the provided view and the delegate should +/// stop tracking the view's impressions and clicks. +- (void)mediatedNativeAd:(id)mediatedNativeAd didUntrackView:(UIView *)view; + @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h index 6f1aed51..3a3cfe6f 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h @@ -6,7 +6,11 @@ // #import + #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform /// some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks @@ -14,6 +18,14 @@ /// by calling the relevant methods from this class. @interface GADMediatedNativeAdNotificationSource : NSObject +/// Called by the adapter when it has registered an impression on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES. ++ (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Called by the adapter when it has registered a user click on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES. ++ (void)mediatedNativeAdDidRecordClick:(id)mediatedNativeAd; + /// Must be called by the adapter just before mediatedNativeAd has opened an in app modal screen. + (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; @@ -29,3 +41,5 @@ + (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h index 8269c87e..9475d35d 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h @@ -6,35 +6,46 @@ // #import + #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Provides methods used for constructing native app install ads. The adapter must return an object /// conforming to this protocol for native app install ad requests. @protocol GADMediatedNativeAppInstallAd /// App title. -- (NSString *)headline; +- (NSString *GAD_NULLABLE_TYPE)headline; /// Array of GADNativeAdImage objects related to the advertised application. -- (NSArray *)images; +- (NSArray *GAD_NULLABLE_TYPE)images; /// App description. -- (NSString *)body; +- (NSString *GAD_NULLABLE_TYPE)body; /// Application icon. -- (GADNativeAdImage *)icon; +- (GADNativeAdImage *GAD_NULLABLE_TYPE)icon; /// Text that encourages user to take some action with the ad. For example "Install". -- (NSString *)callToAction; +- (NSString *GAD_NULLABLE_TYPE)callToAction; /// App store rating (0 to 5). -- (NSDecimalNumber *)starRating; +- (NSDecimalNumber *GAD_NULLABLE_TYPE)starRating; /// The app store name. For example, "App Store". -- (NSString *)store; +- (NSString *GAD_NULLABLE_TYPE)store; /// String representation of the app's price. -- (NSString *)price; +- (NSString *GAD_NULLABLE_TYPE)price; + +@optional + +/// AdChoices view. +- (UIView *GAD_NULLABLE_TYPE)adChoicesView; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h index d5600632..068da584 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h @@ -6,28 +6,39 @@ // #import + #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Provides methods used for constructing native content ads. @protocol GADMediatedNativeContentAd /// Primary text headline. -- (NSString *)headline; +- (NSString *GAD_NULLABLE_TYPE)headline; /// Secondary text. -- (NSString *)body; +- (NSString *GAD_NULLABLE_TYPE)body; /// List of large images. Each object is an instance of GADNativeAdImage. -- (NSArray *)images; +- (NSArray *GAD_NULLABLE_TYPE)images; /// Small logo image. -- (GADNativeAdImage *)logo; +- (GADNativeAdImage *GAD_NULLABLE_TYPE)logo; /// Text that encourages user to take some action with the ad. -- (NSString *)callToAction; +- (NSString *GAD_NULLABLE_TYPE)callToAction; /// Identifies the advertiser. For example, the advertiser’s name or visible URL. -- (NSString *)advertiser; +- (NSString *GAD_NULLABLE_TYPE)advertiser; + +@optional + +/// AdChoices view. +- (UIView *GAD_NULLABLE_TYPE)adChoicesView; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h index 348a17f3..5c7abfbe 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h @@ -7,11 +7,19 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Google Mobile Ads SDK settings. @interface GADMobileAds : NSObject /// Returns the shared GADMobileAds instance. + (GADMobileAds *)sharedInstance; +/// Configures the SDK using the settings associated with the given application ID. ++ (void)configureWithApplicationID:(NSString *)applicationID; + /// Disables automated in app purchase (IAP) reporting. Must be called before any IAP transaction is /// initiated. IAP reporting is used to track IAP ad conversions. Do not disable reporting if you /// use IAP ads. @@ -25,7 +33,23 @@ /// 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). +/// volumes). Defaults to 1.0. @property(nonatomic, assign) float applicationVolume; +/// Indicates if 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; + +/// 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; + @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h index b4937212..c454404f 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h @@ -8,23 +8,29 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + @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) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; /// Root view controller for handling ad actions. -@property(nonatomic, weak) UIViewController *rootViewController; +@property(nonatomic, weak, GAD_NULLABLE) UIViewController *rootViewController; /// Dictionary of assets which aren't processed by the receiver. -@property(nonatomic, readonly, copy) NSDictionary *extraAssets; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDictionary *extraAssets; /// The ad network class name that fetched the current ad. For both standard and mediated Google /// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation /// custom events, this method returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, copy) NSString *adNetworkClassName; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h index fa39d858..e1b3ba3e 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h @@ -7,13 +7,27 @@ #import +#import + @class GADNativeAd; +GAD_ASSUME_NONNULL_BEGIN + /// 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:(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:(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 @@ -39,3 +53,5 @@ - (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h index b448c4fb..971b7146 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h @@ -5,8 +5,12 @@ // Copyright 2015 Google. All rights reserved. // -#import "GADNativeAdImage.h" +#import +#import +GAD_ASSUME_NONNULL_BEGIN + +/// Provides additional GADNativeAdImage initializers. @interface GADNativeAdImage (MediationAdditions) /// Initializes and returns a native ad image object with the provided image. @@ -16,3 +20,5 @@ - (instancetype)initWithURL:(NSURL *)URL scale:(CGFloat)scale; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h index 58da2901..df4b4868 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h @@ -8,16 +8,22 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// Native ad image. @interface GADNativeAdImage : NSObject /// The image. If image autoloading is disabled, this property will be nil. -@property(nonatomic, readonly, strong) UIImage *image; +@property(nonatomic, readonly, strong, GAD_NULLABLE) UIImage *image; /// The image's URL. -@property(nonatomic, readonly, strong) NSURL *imageURL; +@property(nonatomic, readonly, copy) NSURL *imageURL; /// The image's scale. @property(nonatomic, readonly, assign) CGFloat scale; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h index c847e735..4e4d70ba 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h @@ -6,14 +6,18 @@ // #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Native ad image orientation preference. typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { - GADNativeAdImageAdLoaderOptionsOrientationAny, ///< No orientation preference. - GADNativeAdImageAdLoaderOptionsOrientationPortrait, ///< Prefer portrait images. - GADNativeAdImageAdLoaderOptionsOrientationLandscape ///< Prefer landscape images. + 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 if image asset content should be loaded by the SDK. If set to YES, the SDK will not @@ -29,3 +33,5 @@ typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { @property(nonatomic, assign) GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdViewAdOptions.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdViewAdOptions.h new file mode 100644 index 00000000..cd22062c --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdViewAdOptions.h @@ -0,0 +1,29 @@ +// +// GADNativeAdViewAdOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// 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 + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h index 65126276..1f442c3f 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h @@ -8,41 +8,46 @@ #import #import +#import #import +#import #import #import +#import #import -/// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -/// conform to the GADNativeAppInstallAdRequestDelegate protocol. -/// -/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; +GAD_ASSUME_NONNULL_BEGIN -/// Native app install ad. +/// Native app install ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeAppInstall (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in +/// GADAdLoader's initializer method. If you request this ad type, your delegate must conform to the +/// GADNativeAppInstallAdRequestDelegate protocol. @interface GADNativeAppInstallAd : GADNativeAd #pragma mark - Must be displayed /// App title. -@property(nonatomic, readonly, copy) NSString *headline; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *headline; /// Text that encourages user to take some action with the ad. For example "Install". -@property(nonatomic, readonly, copy) NSString *callToAction; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *callToAction; /// Application icon. -@property(nonatomic, readonly, strong) GADNativeAdImage *icon; +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *icon; #pragma mark - Recommended to display /// App description. -@property(nonatomic, readonly, copy) NSString *body; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body; /// The app store name. For example, "App Store". -@property(nonatomic, readonly, copy) NSString *store; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *store; /// String representation of the app's price. -@property(nonatomic, readonly, copy) NSString *price; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *price; /// Array of GADNativeAdImage objects related to the advertised application. -@property(nonatomic, readonly, strong) NSArray *images; +@property(nonatomic, readonly, strong, GAD_NULLABLE) NSArray *images; /// App store rating (0 to 5). -@property(nonatomic, readonly, copy) NSDecimalNumber *starRating; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDecimalNumber *starRating; +/// Video controller for controlling video playback in GADNativeAppInstallAdView's mediaView. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + @end #pragma mark - Protocol and constants @@ -62,16 +67,31 @@ GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; @interface GADNativeAppInstallAdView : UIView /// This property must point to the native app install ad object rendered by this ad view. -@property(nonatomic, strong) GADNativeAppInstallAd *nativeAppInstallAd; - -// Weak references to your ad view's asset views. -@property(nonatomic, weak) IBOutlet UIView *headlineView; -@property(nonatomic, weak) IBOutlet UIView *callToActionView; -@property(nonatomic, weak) IBOutlet UIView *iconView; -@property(nonatomic, weak) IBOutlet UIView *bodyView; -@property(nonatomic, weak) IBOutlet UIView *storeView; -@property(nonatomic, weak) IBOutlet UIView *priceView; -@property(nonatomic, weak) IBOutlet UIView *imageView; -@property(nonatomic, weak) IBOutlet UIView *starRatingView; +@property(nonatomic, strong, GAD_NULLABLE) GADNativeAppInstallAd *nativeAppInstallAd; + +/// Weak reference to your ad view's headline asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *headlineView; +/// Weak reference to your ad view's call to action asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *callToActionView; +/// Weak reference to your ad view's icon asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *iconView; +/// Weak reference to your ad view's body asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *bodyView; +/// Weak reference to your ad view's store asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *storeView; +/// Weak reference to your ad view's price asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *priceView; +/// Weak reference to your ad view's image asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *imageView; +/// Weak reference to your ad view's star rating asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *starRatingView; +/// Weak reference to your ad view's media asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADMediaView *mediaView; +/// Weak reference to your ad view's AdChoices view. Must set adChoicesView before setting +/// nativeAppInstallAd, otherwise AdChoices will be rendered in the publisher's +/// preferredAdChoicesPosition as defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADAdChoicesView *adChoicesView; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h index 0e5d9998..fcb87cd6 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h @@ -8,39 +8,43 @@ #import #import +#import #import +#import #import #import +#import #import -#pragma mark - Native Content Ad Assets +GAD_ASSUME_NONNULL_BEGIN -/// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -/// conform to the GADNativeContentAdRequestDelegate protocol. -/// -/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; +#pragma mark - Native Content Ad Assets -/// Native content ad. +/// Native content ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeContent +/// (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If +/// you request this ad type, your delegate must conform to the GADNativeContentAdRequestDelegate +/// protocol. @interface GADNativeContentAd : GADNativeAd #pragma mark - Must be displayed /// Primary text headline. -@property(nonatomic, readonly, copy) NSString *headline; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *headline; /// Secondary text. -@property(nonatomic, readonly, copy) NSString *body; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body; #pragma mark - Recommended to display /// Large images. -@property(nonatomic, readonly, copy) NSArray *images; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSArray *images; /// Small logo image. -@property(nonatomic, readonly, strong) GADNativeAdImage *logo; +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *logo; /// Text that encourages user to take some action with the ad. -@property(nonatomic, readonly, copy) NSString *callToAction; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *callToAction; /// Identifies the advertiser. For example, the advertiser’s name or visible URL. -@property(nonatomic, readonly, copy) NSString *advertiser; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *advertiser; +/// Video controller for controlling video playback in GADNativeContentAdView's mediaView. +@property(nonatomic, strong, readonly) GADVideoController *videoController; @end #pragma mark - Protocol and constants @@ -59,14 +63,27 @@ GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; @interface GADNativeContentAdView : UIView /// This property must point to the native content ad object rendered by this ad view. -@property(nonatomic, strong) GADNativeContentAd *nativeContentAd; - -// Weak references to your ad view's asset views. -@property(nonatomic, weak) IBOutlet UIView *headlineView; -@property(nonatomic, weak) IBOutlet UIView *bodyView; -@property(nonatomic, weak) IBOutlet UIView *imageView; -@property(nonatomic, weak) IBOutlet UIView *logoView; -@property(nonatomic, weak) IBOutlet UIView *callToActionView; -@property(nonatomic, weak) IBOutlet UIView *advertiserView; +@property(nonatomic, strong, GAD_NULLABLE) GADNativeContentAd *nativeContentAd; + +/// Weak reference to your ad view's headline asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *headlineView; +/// Weak reference to your ad view's body asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *bodyView; +/// Weak reference to your ad view's image asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *imageView; +/// Weak reference to your ad view's logo asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *logoView; +/// Weak reference to your ad view's call to action asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *callToActionView; +/// Weak reference to your ad view's advertiser asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *advertiserView; +/// Weak reference to your ad view's media asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADMediaView *mediaView; +/// Weak reference to your ad view's AdChoices view. Must set adChoicesView before setting +/// nativeContentAd, otherwise AdChoices will be rendered in the publisher's +/// preferredAdChoicesPosition as defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADAdChoicesView *adChoicesView; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h index b7dbd233..fef98aca 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h @@ -9,15 +9,18 @@ #import #import +#import #import #import +#import #import -/// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -/// conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; +GAD_ASSUME_NONNULL_BEGIN -/// Native custom template ad. +/// Native custom template ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeCustomTemplate (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 ad's custom template ID. @@ -26,19 +29,26 @@ GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; /// Array of available asset keys. @property(nonatomic, readonly) NSArray *availableAssetKeys; +/// Returns video controller for controlling receiver's video. +@property(nonatomic, readonly, strong) GADVideoController *videoController; + +/// Returns media view for rendering video loaded by the receiver. Returns nil if receiver doesn't +/// has a video. +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADMediaView *mediaView; + /// Returns the native ad image corresponding to the specified key or nil if the image is not /// available. -- (GADNativeAdImage *)imageForKey:(NSString *)key; +- (GADNativeAdImage *GAD_NULLABLE_TYPE)imageForKey:(NSString *)key; /// Returns the string corresponding to the specified key or nil if the string is not available. -- (NSString *)stringForKey:(NSString *)key; +- (NSString *GAD_NULLABLE_TYPE)stringForKey:(NSString *)key; /// 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. - (void)performClickOnAssetWithKey:(NSString *)assetKey - customClickHandler:(dispatch_block_t)customClickHandler; + customClickHandler:(dispatch_block_t GAD_NULLABLE_TYPE)customClickHandler; /// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the /// first impression is recorded. @@ -52,7 +62,7 @@ GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; /// GADNativeCustomTemplateAd ads. @protocol GADNativeCustomTemplateAdLoaderDelegate -/// Called when requesting an ad. Asks the delgate for an array of custom template ID strings. +/// Called when requesting an ad. Asks the delegate for an array of custom template ID strings. - (NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader; /// Tells the delegate that a native custom template ad was received. @@ -60,3 +70,5 @@ GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h new file mode 100644 index 00000000..2eeb67c9 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h @@ -0,0 +1,96 @@ +// +// GADNativeExpressAdView.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The view that displays native ads. A minimum implementation to get an ad from within a +/// UIViewController class is: +/// +///
+///   // Create and setup the ad view, specifying the size and origin at {0, 0}.
+///   GADNativeExpressAdView *adView =
+///       [[GADNativeExpressAdView alloc] initWithAdSize:kGADAdSizeBanner];
+///   adView.rootViewController = self;
+///   adView.adUnitID = @"ID created when registering your app";
+///   // Place the ad view onto the screen.
+///   [self.view addSubview:adView];
+///   // Request an ad without any additional targeting information.
+///   [adView loadRequest:[GADRequest request]];
+///   
+@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. +- (instancetype GAD_NULLABLE_TYPE)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. +- (instancetype GAD_NULLABLE_TYPE)initWithAdSize:(GADAdSize)adSize; + +/// Video controller for controlling video rendered by this native express ad view. +@property(nonatomic, strong, readonly) 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, GAD_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, GAD_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, GAD_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:(NSArray *)adOptions; + +#pragma mark - Making an Ad Request + +/// Makes an ad request. The request object supplies targeting information. +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)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, GAD_NULLABLE) NSString *adNetworkClassName; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h new file mode 100644 index 00000000..73bd5e0b --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h @@ -0,0 +1,54 @@ +// +// GADNativeExpressAdViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADNativeExpressAdView; +@class GADRequestError; + +GAD_ASSUME_NONNULL_BEGIN + +/// 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:(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:(GADNativeExpressAdView *)nativeExpressAdView + didFailToReceiveAdWithError:(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:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view will be dismissed. +- (void)nativeExpressAdViewWillDismissScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view has been dismissed. The delegate should restart +/// anything paused while handling adViewWillPresentScreen:. +- (void)nativeExpressAdViewDidDismissScreen:(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:(GADNativeExpressAdView *)nativeExpressAdView; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h index 68060d52..422ba55a 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h @@ -8,13 +8,14 @@ #import #import +#import #import +GAD_ASSUME_NONNULL_BEGIN + /// Add this constant to the testDevices property's array to receive test ads on the simulator. GAD_EXTERN const id kGADSimulatorID; -@protocol GADAdNetworkExtras; - /// Genders to help deliver more relevant ads. typedef NS_ENUM(NSInteger, GADGender) { kGADGenderUnknown, ///< Unknown gender. @@ -39,7 +40,7 @@ typedef NS_ENUM(NSInteger, GADGender) { - (void)registerAdNetworkExtras:(id)extras; /// Returns the network extras defined for an ad network. -- (id)adNetworkExtrasFor:(Class)aClass; +- (id GAD_NULLABLE_TYPE)adNetworkExtrasFor:(Class)aClass; /// Removes the extras for an ad network. |aClass| is the class which represents that network's /// extras type. @@ -53,7 +54,7 @@ typedef NS_ENUM(NSInteger, GADGender) { #pragma mark Testing /// Test ads will be returned for devices with device IDs specified in this array. -@property(nonatomic, copy) NSArray *testDevices; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *testDevices; #pragma mark User Information @@ -61,7 +62,7 @@ typedef NS_ENUM(NSInteger, GADGender) { @property(nonatomic, assign) GADGender gender; /// Provide the user's birthday to increase ad relevancy. -@property(nonatomic, copy) NSDate *birthday; +@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday; /// The user's current location may be used to deliver more relevant ads. However do not use Core /// Location just for advertising, make sure it is used for more beneficial reasons as well. It is @@ -93,11 +94,11 @@ typedef NS_ENUM(NSInteger, GADGender) { /// 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) NSArray *keywords; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *keywords; /// URL string for a webpage whose content matches the app content. This webpage content is used for /// targeting purposes. -@property(nonatomic, copy) NSString *contentURL; +@property(nonatomic, copy, GAD_NULLABLE) NSString *contentURL; #pragma mark Request Agent Information @@ -105,7 +106,7 @@ typedef NS_ENUM(NSInteger, GADGender) { /// 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) NSString *requestAgent; +@property(nonatomic, copy, GAD_NULLABLE) NSString *requestAgent; #pragma mark Deprecated Methods @@ -118,7 +119,9 @@ typedef NS_ENUM(NSInteger, GADGender) { /// 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:(NSString *)locationDescription +- (void)setLocationWithDescription:(NSString *GAD_NULLABLE_TYPE)locationDescription GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h index 31175e49..b38dcbe8 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h @@ -11,6 +11,8 @@ @class GADRequest; +GAD_ASSUME_NONNULL_BEGIN + /// Google AdMob Ads error domain. GAD_EXTERN NSString *const kGADErrorDomain; @@ -64,3 +66,5 @@ typedef NS_ENUM(NSInteger, GADErrorCode) { /// Represents the error generated due to invalid request parameters. @interface GADRequestError : NSError @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h index 77a71e85..806f80be 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h @@ -8,32 +8,40 @@ #import #import -@class GADRequest; +#import +#import @protocol GADRewardBasedVideoAdDelegate; +GAD_ASSUME_NONNULL_BEGIN + /// The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. /// This class isn't thread safe. @interface GADRewardBasedVideoAd : NSObject /// Delegate for receiving video notifications. -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; /// Indicates if 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, GAD_NULLABLE) NSString *adNetworkClassName; + /// Returns the shared GADRewardBasedVideoAd instance. + (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. The userID is any unique identifier used for identifying the user -/// interacting with the application and can be nil. -- (void)loadRequest:(GADRequest *)request - withAdUnitID:(NSString *)adUnitID - userID:(NSString *)userID; +/// ad and must not be nil. +- (void)loadRequest:(GADRequest *)request withAdUnitID:(NSString *)adUnitID; /// Presents the reward based video ad with the provided view controller. - (void)presentFromRootViewController:(UIViewController *)viewController; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h index 9502db80..f81dd592 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h @@ -8,34 +8,42 @@ #import #import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN /// 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:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didRewardUserWithReward:(GADAdReward *)reward; + @optional -/// Tells the delegate that the reward based video ad has been received. +/// Tells the delegate that the reward based video ad failed to load. +- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didFailToLoadWithError:(NSError *)error; + +/// Tells the delegate that a reward based video ad was received. - (void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad is opened. +/// Tells the delegate that the reward based video ad opened. - (void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad has started playing. +/// Tells the delegate that the reward based video ad started playing. - (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad is closed. +/// Tells the delegate that the reward based video ad closed. - (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd; /// Tells the delegate that the reward based video ad will leave the application. - (void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad has rewarded the user. -- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd - didRewardUserWithReward:(GADAdReward *)reward; - -/// Tells the delegate that the reward based video ad has failed to load. -- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd - didFailToLoadWithError:(NSError *)error; - @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h index 363ad24c..590b2770 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h @@ -5,12 +5,23 @@ // Copyright 2011 Google Inc. All rights reserved. // +#import #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 GADSearchRequest ad request object to hold the search query and other search data. -// 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest object. +GAD_ASSUME_NONNULL_BEGIN + +/// 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 GADSearchRequest ad request object to hold the search query and other search data. +/// 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest 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, GAD_NULLABLE) IBOutlet id adSizeDelegate; + @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h index 461852ae..34fb68bd 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h @@ -9,49 +9,69 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Search ad border types. typedef NS_ENUM(NSUInteger, GADSearchBorderType) { - kGADSearchBorderTypeNone, - kGADSearchBorderTypeDashed, - kGADSearchBorderTypeDotted, - kGADSearchBorderTypeSolid + kGADSearchBorderTypeNone, ///< No border. + kGADSearchBorderTypeDashed, ///< Dashed line border. + kGADSearchBorderTypeDotted, ///< Dotted line border. + kGADSearchBorderTypeSolid ///< Solid line border. }; +/// Search ad call button color types. typedef NS_ENUM(NSUInteger, GADSearchCallButtonColor) { - kGADSearchCallButtonLight, - kGADSearchCallButtonMedium, - kGADSearchCallButtonDark + kGADSearchCallButtonLight, ///< Light button color. + kGADSearchCallButtonMedium, ///< Medium button color. + kGADSearchCallButtonDark ///< Dark button color. }; -// Specifies parameters for search ads. +/// Specifies parameters for search ads. @interface GADSearchRequest : GADRequest -@property(nonatomic, copy) NSString *query; -@property(nonatomic, copy, readonly) UIColor *backgroundColor; -@property(nonatomic, copy, readonly) UIColor *gradientFrom; -@property(nonatomic, copy, readonly) UIColor *gradientTo; -@property(nonatomic, copy) UIColor *headerColor; -@property(nonatomic, copy) UIColor *descriptionTextColor; -@property(nonatomic, copy) UIColor *anchorTextColor; -@property(nonatomic, copy) NSString *fontFamily; +/// The search ad query. +@property(nonatomic, copy, GAD_NULLABLE) NSString *query; +/// The search ad background color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *backgroundColor; +/// The search ad gradient "from" color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *gradientFrom; +/// The search ad gradient "to" color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *gradientTo; +/// The search ad header color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *headerColor; +/// The search ad description text color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *descriptionTextColor; +/// The search ad anchor text color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *anchorTextColor; +/// The search ad text font family. +@property(nonatomic, copy, GAD_NULLABLE) NSString *fontFamily; +/// The search ad header text size. @property(nonatomic, assign) NSUInteger headerTextSize; -@property(nonatomic, copy) UIColor *borderColor; +/// The search ad border color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *borderColor; +/// The search ad border type. @property(nonatomic, assign) GADSearchBorderType borderType; +/// The search ad border thickness. @property(nonatomic, assign) NSUInteger borderThickness; -@property(nonatomic, copy) NSString *customChannels; +/// The search ad custom channels. +@property(nonatomic, copy, GAD_NULLABLE) NSString *customChannels; +/// The search ad call button color. @property(nonatomic, assign) GADSearchCallButtonColor callButtonColor; -// A solid background color for rendering the ad. The background of the ad -// can either be a solid color, or a gradient, which can be specified through -// setBackgroundGradientFrom:toColor: method. If both solid and gradient -// background is requested, only the latter is considered. +/// A solid background color for rendering the ad. The background of the ad +/// can either be a solid color, or a gradient, which can be specified through +/// setBackgroundGradientFrom:toColor: method. If both solid and gradient +/// background is requested, only the latter is considered. - (void)setBackgroundSolid:(UIColor *)color; -// A linear gradient background color for rendering the ad. The background of -// the ad can either be a linear gradient, or a solid color, which can be -// specified through setBackgroundSolid method. If both solid and gradient -// background is requested, only the latter is considered. +/// A linear gradient background color for rendering the ad. The background of +/// the ad can either be a linear gradient, or a solid color, which can be +/// specified through setBackgroundSolid method. If both solid and gradient +/// background is requested, only the latter is considered. - (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor; @end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h new file mode 100644 index 00000000..861f459e --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h @@ -0,0 +1,47 @@ +// +// GADVideoController.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@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. Currently only native express +/// ad view class exposes video controller. +@interface GADVideoController : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak, GAD_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; + +/// Returns a Boolean indicating if the receiver has video content. +- (BOOL)hasVideoContent; + +/// Returns the video's aspect ratio (width/height) or 0 if no video is present. +- (double)aspectRatio; + +/// Indicates if video custom controls (i.e. play/pause/mute/unmute) are enabled. +- (BOOL)customControlsEnabled; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h new file mode 100644 index 00000000..4b6fff9c --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h @@ -0,0 +1,37 @@ +// +// GADVideoControllerDelegate.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The GADVideoControllerDelegate protocol defines methods that are called by the video controller +/// object in response to the video events that occured throught 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:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has paused video. +- (void)videoControllerDidPauseVideo:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller's video playback has ended. +- (void)videoControllerDidEndVideoPlayback:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has muted video. +- (void)videoControllerDidMuteVideo:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has unmuted video. +- (void)videoControllerDidUnmuteVideo:(GADVideoController *)videoController; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h new file mode 100644 index 00000000..f77c6454 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h @@ -0,0 +1,24 @@ +// +// GADVideoOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Video ad options. +@interface GADVideoOptions : GADAdLoaderOptions + +/// Indicates if videos should start muted. By default this property value is YES. +@property(nonatomic, assign) BOOL startMuted; + +/// Indicates if the requested video should have custom controls enabled for play/pause/mute/unmute. +@property(nonatomic, assign) BOOL customControlsRequested; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h index 1f5490b2..7c0df612 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h @@ -11,7 +11,7 @@ #error The Google Mobile Ads SDK requires a deployment target of iOS 6.0 or later. #endif -//! Project version string for GoogleMobileAds. +/// Project version string for GoogleMobileAds. FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; // Header files. @@ -24,14 +24,21 @@ 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 @@ -46,6 +53,7 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import +#import #import #import #import @@ -55,6 +63,7 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import +#import #import #import @@ -63,6 +72,7 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import #import +#import #import #import #import @@ -70,9 +80,17 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import +#import #import #import #import #import #import + +#import +#import +#import +#import +#import +#import diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h index ad036c97..229ffd89 100644 --- a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h @@ -5,6 +5,8 @@ // Copyright (c) 2015 Google Inc. All rights reserved. // +#import + #if defined(__cplusplus) #define GAD_EXTERN extern "C" __attribute__((visibility("default"))) #else @@ -28,3 +30,27 @@ #define GAD_DEPRECATED_ATTRIBUTE #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) #endif // defined(__has_feature) && defined(__has_attribute) + +#ifndef IBInspectable +#define IBInspectable +#endif + +#if __has_feature(nullability) // Available starting in Xcode 6.3. +#define GAD_NULLABLE_TYPE __nullable +#define GAD_NONNULL_TYPE __nonnull +#define GAD_NULLABLE nullable +#define GAD_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END +#else +#define GAD_NULLABLE_TYPE +#define GAD_NONNULL_TYPE +#define GAD_NULLABLE +#define GAD_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END +#endif // __has_feature(nullability) + +#if __has_attribute(objc_boxable) // Available starting in Xcode 7.3. +#define GAD_BOXABLE __attribute__((objc_boxable)) +#else +#define GAD_BOXABLE +#endif // __has_attribute(objc_boxable) diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h new file mode 100644 index 00000000..f5ee207c --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h @@ -0,0 +1,104 @@ +// +// GADMAdNetworkAdapterProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import + +#import "GADMAdNetworkConnectorProtocol.h" +#import "GADMEnums.h" + +/// Subclasses should prefix their name with "GADMAdapter" example: GADMAdapterGoogleAdMobAds +#define kGADMAdapterClassNamePrefix @"GADMAdapter" + +@protocol GADMAdNetworkConnector; + +/// Ad network adapter protocol. +@protocol GADMAdNetworkAdapter + +/// 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; + +/// Designated initializer. Implementing classes can and should keep the connector in an instance +/// variable. However you must never retain the connector, as doing so will create a circular +/// reference and cause memory leaks. +- (instancetype)initWithGADMAdNetworkConnector:(id)connector; + +/// Asks the adapter to initiate a banner ad request. The adapter does not need to return anything. +/// The assumption is that the adapter will start an asynchronous ad fetch over the network. Your +/// adapter may act as a delegate to your SDK to listen to callbacks. If your SDK does not support +/// the given ad size, or does not support banner ads, call back to the adapter:didFailAd: method of +/// the connector. +- (void)getBannerWithSize:(GADAdSize)adSize; + +/// Asks the adapter to initiate an interstitial ad request. The adapter does not need to return +/// anything. The assumption is that the adapter will start an asynchronous ad fetch over the +/// network. Your adapter may act as a delegate to your SDK to listen to callbacks. If your SDK does +/// not support interstitials, call back to the adapter:didFailInterstitial: method of the +/// connector. +- (void)getInterstitial; + +/// When called, the adapter must remove itself as a delegate or notification observer from the +/// underlying ad network SDK. You should also call this method in your adapter dealloc, so when +/// your adapter goes away, your SDK will not call a freed object. This function should be +/// idempotent and should not crash regardless of when or how many times the method is called. +- (void)stopBeingDelegate; + +/// Some ad transition types may cause issues with particular Ad SDKs. The adapter may decide +/// whether the given animation type is OK. Defaults to YES. +- (BOOL)isBannerAnimationOK:(GADMBannerAnimationType)animType; + +/// Present an interstitial using the supplied UIViewController, by calling +/// presentViewController:animated:completion:. +/// +/// 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. +/// +/// Make sure to 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 + +/// Starts request for a native ad. |adTypes| contains the list of native ad types requested. See +/// GADAdLoaderAdTypes.h for available ad types. |options| are any additional options configured by +/// the publisher for requesting a native ad. See GADNativeAdImageAdLoaderOptions.h for available +/// image options. When this method is called the receiver may start native ad request +/// asynchronously. On completion the receiver should notify the Google Mobile Ads SDK with a native +/// ad object using the receiver's connector method +/// adapter:didReceiveNativeAdDataSource:mediationDelegate or adapter:didFailAd: if the ad request +/// encountered an error. +- (void)getNativeAdWithAdTypes:(NSArray *)adTypes options:(NSArray *)options; + +/// Indicates if the adapter handles user clicks. If this method returns YES, the adapter must +/// handle user clicks and notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. If this method returns +/// NO, the Google Mobile Ads SDK handles user clicks and notifies the adapter of clicks using +/// -[GADMediatedNativeAdDelegate +/// mediatedNativeAd:didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if the adapter handles user impressions tracking. If this method 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 this method returns NO, +/// the Google Mobile Ads SDK tracks user impressions and notifies the adapter of impressions +/// using -[GADMediatedNativeAdDelegate mediatedNativeAdDidRecordImpression:]. +- (BOOL)handlesUserImpressions; + +/// If your ad network handles multiple ad sizes for the same banner ad, implement this method to +/// know when the user changes the banner size. This is typically changing from +/// kGADAdSizeSmartBannerPortrait to kGADAdSizeSmartBannerLandscape, or vice versa. If this method +/// is not implemented, every time the user changes the ad size, a new ad will be requested with the +/// new size by calling your getBannerWithSize: method. +- (void)changeAdSizeTo:(GADAdSize)adSize; + +@end diff --git a/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h new file mode 100644 index 00000000..075ca3ce --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h @@ -0,0 +1,87 @@ +// +// GADMAdNetworkConnectorProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import +#import + +#import "GADMediationAdRequest.h" + +@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; + +#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 mediated native ad. |mediatedNativeAd| is +/// used by the Google Mobile Ads SDK for constructing a native ad object. +- (void)adapter:(id)adapter + didReceiveMediatedNativeAd:(id)mediatedNativeAd; + +#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/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMEnums.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMEnums.h new file mode 100644 index 00000000..1802598c --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/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/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h new file mode 100644 index 00000000..6eb05f1c --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h @@ -0,0 +1,67 @@ +// +// GADMRewardBasedVideoAdNetworkAdapter.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +@protocol GADMRewardBasedVideoAdNetworkConnector; + +/// 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/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h new file mode 100644 index 00000000..82b8d452 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h @@ -0,0 +1,58 @@ +// +// GADMRewardBasedVideoAdNetworkConnector.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +@protocol GADMediationAdRequest; +@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 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/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h new file mode 100644 index 00000000..104ea5a2 --- /dev/null +++ b/ios/platform/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h @@ -0,0 +1,56 @@ +// +// GADMediationAdRequest.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#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. +- (NSString *)publisherId; + +/// Mediation configurations set by the publisher on the AdMob frontend. +- (NSDictionary *)credentials; + +/// Returns YES if the publisher is requesting test ads. +- (BOOL)testMode; + +/// The adapter's ad network extras specified in GADRequest. +- (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. +- (NSNumber *)childDirectedTreatment; + +/// The end user's gender set by the publisher in GADRequest. Returns kGADGenderUnknown if it has +/// not been specified. +- (GADGender)userGender; + +/// The end user's birthday set by the publisher. Returns nil if it has not been specified. +- (NSDate *)userBirthday; + +/// Returns YES if the publisher has specified latitude and longitude location. +- (BOOL)userHasLocation; + +/// 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. +- (NSString *)userLocationDescription; + +/// Keywords describing the user's current activity. Example: @"Sport Scores". +- (NSArray *)userKeywords; + +@end