Bläddra i källkod

Added admob module.

Mark Sibly 7 år sedan
förälder
incheckning
76fcb3ac57
77 ändrade filer med 5055 tillägg och 0 borttagningar
  1. 97 0
      modules/admob/README.TXT
  2. 18 0
      modules/admob/VERSIONS.TXT
  3. 161 0
      modules/admob/admob.monkey2
  4. 117 0
      modules/admob/admob_android.monkey2
  5. 34 0
      modules/admob/admob_ios.monkey2
  6. 103 0
      modules/admob/bananas/banner.monkey2
  7. 111 0
      modules/admob/bananas/interstitial.monkey2
  8. 114 0
      modules/admob/bananas/rewardedvideo.monkey2
  9. 7 0
      modules/admob/module.json
  10. 110 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPBannerView.h
  11. 29 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPBannerViewOptions.h
  12. 34 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedAd.h
  13. 28 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedBannerViewDelegate.h
  14. 29 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedInterstitialDelegate.h
  15. 39 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPInterstitial.h
  16. 37 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPRequest.h
  17. 25 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdChoicesView.h
  18. 53 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoader.h
  19. 37 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoaderAdTypes.h
  20. 31 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoaderDelegate.h
  21. 22 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdNetworkExtras.h
  22. 30 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdReward.h
  23. 117 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdSize.h
  24. 26 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdSizeDelegate.h
  25. 35 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAppEventDelegate.h
  26. 34 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAudioVideoManager.h
  27. 39 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAudioVideoManagerDelegate.h
  28. 107 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADBannerView.h
  29. 53 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADBannerViewDelegate.h
  30. 23 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCorrelator.h
  31. 22 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCorrelatorAdLoaderOptions.h
  32. 40 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventBanner.h
  33. 68 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventBannerDelegate.h
  34. 35 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventExtras.h
  35. 43 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventInterstitial.h
  36. 62 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventInterstitialDelegate.h
  37. 58 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventNativeAd.h
  38. 31 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventNativeAdDelegate.h
  39. 19 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventParameters.h
  40. 59 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventRequest.h
  41. 36 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADDebugOptionsViewController.h
  42. 165 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADDynamicHeightSearchRequest.h
  43. 23 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADExtras.h
  44. 90 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInAppPurchase.h
  45. 50 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInAppPurchaseDelegate.h
  46. 88 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInterstitial.h
  47. 58 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInterstitialDelegate.h
  48. 29 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMediaView.h
  49. 59 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMobileAds.h
  50. 27 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMultipleAdsAdLoaderOptions.h
  51. 36 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAd.h
  52. 57 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdDelegate.h
  53. 24 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImage+Mediation.h
  54. 29 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImage.h
  55. 37 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImageAdLoaderOptions.h
  56. 29 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdViewAdOptions.h
  57. 118 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAppInstallAd.h
  58. 30 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAppInstallAdAssetIDs.h
  59. 111 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeContentAd.h
  60. 28 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeContentAdAssetIDs.h
  61. 94 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeCustomTemplateAd.h
  62. 96 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeExpressAdView.h
  63. 54 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeExpressAdViewDelegate.h
  64. 127 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRequest.h
  65. 70 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRequestError.h
  66. 52 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRewardBasedVideoAd.h
  67. 49 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRewardBasedVideoAdDelegate.h
  68. 27 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADSearchBannerView.h
  69. 77 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADSearchRequest.h
  70. 49 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoController.h
  71. 37 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoControllerDelegate.h
  72. 27 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoOptions.h
  73. 105 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GoogleMobileAds.h
  74. 62 0
      modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GoogleMobileAdsDefines.h
  75. 383 0
      modules/admob/native/Monkey2AdView.java
  76. 93 0
      modules/admob/native/adview_ios.h
  77. 392 0
      modules/admob/native/adview_ios.mm

+ 97 - 0
modules/admob/README.TXT

@@ -0,0 +1,97 @@
+
+***** Installation *****
+
+This README.TXT file should be located inside an 'admob' folder. You will need to copy this folder to your monkey2 'modules' folder, after which you will need to 'update modules' for the particular target you are planning to use admob with (ios or android). To update modules, select 'Update Modules' from the 'Build' menu of Ted2/Ted2go, the monkey2 IDE.
+
+You can then try out one of the samples in the admob/bananas directory: 'banner', 'interstitial' or 'rewardedvideo'. See notes below for help with building admob apps for ios or android.
+
+
+***** Class AdView API *****
+
+
+* Method New( size:String,layout:String="",adUnitId:String="",visible:Bool=True )
+
+Creates an AdView and starts it loading.
+
+'size' should be one of the following: "banner", "large-banner", "medium-rectangle", "full-banner" or "leaderboard" for a banner ad, "interstitial" for an interstitial ad or "rewardedvideo" for a rewarded video ad.
+
+'layout' is ignored for interstitial and rewarded video ads, which are always 'full screen'. For banner ads, it should be one of: "top", "bottom", "left", "right" "top-left", "top-right", "bottom-left", "bottom-right" or "center".
+
+'adUnitId' is the admob ad unit id of the ad you want to display. Ad unit ids are created from you admob account. Set ad unit id to an empty string to create a 'test' ad.
+
+For banner ads, if 'visible' is true then the ad is initially visible and will automatically appear once it has successfully loaded. Otherwise the ad will be initially hidden.
+
+
+* Property Visible:Bool	(read/write)
+
+Set to true to show an ad. In the case of interstitial ads, setting `Visible` to true will also show the ad. In the case of rewarded video ads, setting `Visible` to true will also play the video.
+
+	
+* Property State:AdState (read only)
+	
+Returns the current ad state, one of: AdState.Loading, AdState.Ready or AdState.Error.
+
+
+* Method Reload()
+
+Reloads the AdView, should only be used in the case of an ad load error.
+
+
+* Field Loading:Void()
+
+Invoked when AdView state changes to AdState.Loading.
+
+
+* Field Ready:Void()
+
+Invoked when the AdView state changes to AdState.Ready.
+
+
+* Field Error:Void( error:Int )
+
+Invoked when an AdView error occurs, usually while loading. In this case, you can wait a while and call Reload() if you want.
+
+
+* Field Rewarded:Void( type:String,amount:Int )
+
+Invoke when the user has sat through a rewarded video and therefore claimed their reward. The 'type' and 'amount' parameters will default to "coins" and 10 if you are using test ads. Otherwise, they will reflect the values associated with the ad unit you are using as entered on the admob web page.
+
+
+***** Using the admob module with android studio *****
+
+To prepare an android studio project for use with admob, add the following line to your project's 'build.gradle (Module:app)' file inside the 'dependancies' block...
+
+    compile 'com.google.android.gms:play-services-ads:11.8.0'
+    
+You may need to change the version number depending on when you're reading this.
+
+After this, you'll need to do a 'gradle sync'.
+
+If you get stuck, try looking at the 'import sdk' section here:
+
+https://developers.google.com/admob/android/quick-start
+
+
+***** Using the admob module with ios/xcode *****
+
+To prepare an xcode project for use with admob you will need to add the google mobile ads framework to the project. The framework can be downloaded here: https://developers.google.com/admob/ios/download
+
+You will also need to add the following system frameworks to the project:
+
+AdSupport.framework
+CFNetwork.framework
+CoreMedia.framework
+CoreTelephony.framework
+CoreVideo.framework
+GLKit.framework
+MediaPlayer.framework
+MessageUI.framework
+MobileCoreServices.framework
+Security.framework
+StoreKit.framework
+SystemConfiguration.framework
+
+If you get stuck, try looking at the 'import sdk' section here:
+
+https://developers.google.com/admob/ios/quick-start
+

+ 18 - 0
modules/admob/VERSIONS.TXT

@@ -0,0 +1,18 @@
+
+***** V1.0.07 *****
+
+Cleaned up README.TXT a bit.
+
+
+***** V1.0.06 *****
+
+Added VERSIONS.TXT
+
+Added rewarded video ads.
+
+Architecture significantly changed, you now need to create an AdView instance - see bananas.
+
+
+***** V1.0.05 *****
+
+Initial release.

+ 161 - 0
modules/admob/admob.monkey2

@@ -0,0 +1,161 @@
+
+Namespace admob
+
+#Import "<std>"
+
+#If __MOBILE_TARGET__
+
+#Import "<mojo>"
+
+#If __TARGET__="android"
+
+#Import "admob_android"
+
+#Else If __TARGET__="ios"
+
+#Import "admob_ios"
+
+#Endif
+
+Using mojo..
+
+Enum AdState
+	Initial=0
+	Loading=1
+	Ready=2
+	Error=3
+End
+
+Class AdView Extends BBAdView
+	
+	Field Loading:Void()
+	
+	Field Ready:Void()
+	
+	Field Error:Void( error:Int )
+	
+	Field Rewarded:Void( type:String,amount:Int )
+	
+	Method New( size:String,layout:String,adUnitId:String,visible:Bool=True )
+	
+		Super.New( size,layout,adUnitId,visible )
+		
+		_rewardedVideo=(size="rewardedvideo")
+
+		_interstitial=(size="interstitial")
+		
+		_state=AdState.Initial
+		
+		_callback=std.async.CreateAsyncCallback( StateChanged,False )
+		
+		Super.start( _callback )
+		
+		'BeginPolling()
+	End
+	
+	Property Visible:Bool()
+		
+		Return Super.getVisible()
+	
+	Setter( visible:Bool )
+		
+		If _rewardedVideo Or _interstitial
+			
+			If Not visible Or _state<>AdState.Ready Return
+			
+			Super.setVisible( visible )
+			
+			_playing=True
+		
+'			BeginPolling()
+			
+		Endif
+		
+		Super.setVisible( visible )
+	End
+	
+	Property State:AdState()
+		
+		Return _state
+	End
+	
+	Method Reload()
+		
+		If _state<>AdState.Error Return
+		
+		_state=AdState.Initial
+		
+'		BeginPolling()
+		
+		Super.reload()
+	End
+	
+	Private
+	
+	Field _rewardedVideo:Bool
+	Field _interstitial:Bool
+	Field _state:AdState
+	Field _playing:Bool
+	Field _callback:Int
+	
+	Method StateChanged()
+	
+		Local newstate:=Cast<AdState>( Super.getState() )
+		
+'		Print "StateChanged: state="+Int( _state )+", newstate="+Int( newstate )
+
+		If _playing
+			Select newstate
+			Case AdState.Initial
+				_state=newstate
+				_playing=False
+				Super.reload()
+				If _rewardedVideo And Super.getRewardType()
+					Local rewardType:=Super.getRewardType()
+					Local rewardAmount:=Super.getRewardAmount()
+					Super.consumeReward()
+					Rewarded( rewardType,rewardAmount )
+				Endif
+			End
+		Else If newstate<>_state
+			Select newstate
+			Case AdState.Loading
+				Assert( _state=AdState.Initial )
+				_state=newstate
+				Loading()
+			Case AdState.Ready
+				Assert( _state=AdState.Initial Or _state=AdState.Loading )
+				_state=newstate
+				Ready()
+			Case AdState.Error
+				Assert( _state=AdState.Initial Or _state=AdState.Loading )
+				_state=newstate
+				Error( Super.getError() )
+			End
+		Endif
+	End
+	
+	#rem
+	
+	Field _polling:Bool
+	
+	Method BeginPolling()
+		If Not _polling And (_state=AdState.Initial Or _state=AdState.Loading Or _playing)
+			App.Idle+=Poll
+			_polling=True
+		Endif
+	End
+	
+	Method Poll()
+		
+		_polling=False
+		
+		StateChanged()
+		
+		BeginPolling()
+	End
+	
+	#end
+	
+	
+End

+ 117 - 0
modules/admob/admob_android.monkey2

@@ -0,0 +1,117 @@
+
+Namespace admob
+
+#Import "<jni>"
+
+#Import "native/Monkey2AdView.java"
+
+Using jni..
+
+Class BBAdView
+	
+	Method New( size:String,layout:String="top",adUnitId:String="",visible:bool=True )
+		
+		Init()
+		
+		Local instance:=Env.NewObject( _class,_ctor,New Variant[]( size,layout,adUnitId,visible ) )
+		
+		_instance=Env.NewGlobalRef( instance )
+		
+		Env.DeleteLocalRef( instance )
+	
+	End
+	
+	Method start( callback:Int )
+	
+		Env.CallVoidMethod( _instance,_start,New Variant[]( callback ) )
+	End
+
+	Method setVisible( visible:Bool )
+
+		Env.CallVoidMethod( _instance,_setVisible,New Variant[]( visible ) )
+	End
+	
+	Method getVisible:Bool()
+		
+		Return Env.CallBooleanMethod( _instance,_getVisible,Null )
+	
+	End
+
+	Method getState:Int()
+
+		Return Env.CallIntMethod( _instance,_getState,Null )
+	End
+	
+	Method getRewardType:String()
+		
+		Return Env.CallStringMethod( _instance,_getRewardType,Null )
+		
+	End
+	
+	Method getRewardAmount:Int()
+		
+		Return Env.CallIntMethod( _instance,_getRewardAmount,Null )
+		
+	End
+	
+	Method consumeReward()
+		
+		Env.CallVoidMethod( _instance,_consumeReward,Null )
+	
+	End
+	
+	Method getError:Int()
+
+		Return Env.CallIntMethod( _instance,_getError,Null )
+	
+	End
+
+	Method reload:Void()
+
+		Env.CallVoidMethod( _instance,_reload,Null )
+
+	End
+	
+	Private
+	
+	Global _class:jclass
+	Global _ctor:jmethodID
+	Global _start:jmethodID
+	Global _setVisible:jmethodID
+	Global _getVisible:jmethodID
+	Global _getState:jmethodID
+	Global _getRewardType:jmethodID
+	Global _getRewardAmount:jmethodID
+	Global _consumeReward:jmethodID
+	Global _getError:jmethodID
+	Global _reload:jmethodID
+	
+	Field _instance:jobject
+	Field _globalref:jobject
+	
+	Function Init()
+	
+		If _class Return
+
+		Local env:=sdl2.Android_JNI_GetEnv()
+
+		_class=env.FindClass( "com/monkey2/lib/Monkey2AdView" )
+		_ctor=env.GetMethodID( _class,"<init>","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V" )
+		_start=env.GetMethodID( _class,"start","(I)V" )
+		_setVisible=env.GetMethodID( _class,"setVisible","(Z)V" )
+		_getVisible=env.GetMethodID( _class,"getVisible","()Z" )
+		_getState=env.GetMethodID( _class,"getState","()I" )
+		_getRewardType=env.GetMethodID( _class,"getRewardType","()Ljava/lang/String;" )
+		_getRewardAmount=env.GetMethodID( _class,"getRewardAmount","()I" )
+		_consumeReward=env.GetMethodID( _class,"consumeReward","()V" )
+		_getError=env.GetMethodID( _class,"getError","()I" )
+		_reload=env.GetMethodID( _class,"reload","()V" )
+		
+	End
+	
+	Property Env:JNIEnv()
+		
+		Return sdl2.Android_JNI_GetEnv()
+	End
+	
+End

+ 34 - 0
modules/admob/admob_ios.monkey2

@@ -0,0 +1,34 @@
+
+Namespace admob
+
+#Import "native/GoogleMobileAds-7.27.0/*.h"
+
+#Import "native/adview_ios.mm"
+#Import "native/adview_ios.h"
+
+Extern Internal
+
+Class BBAdView
+	
+	Protected
+		
+	Method New( size:String,layout:String="top",adUnitId:String="",show:Bool=True )
+		
+	Method start( callback:Int )
+
+	Method setVisible( visible:Bool )
+	
+	Method getVisible:Bool()
+		
+	Method getState:Int()
+		
+	Method getRewardType:String()
+	
+	Method getRewardAmount:Int()
+		
+	Method consumeReward:Void()
+		
+	Method getError:Int()
+
+	Method reload:Void()
+End

+ 103 - 0
modules/admob/bananas/banner.monkey2

@@ -0,0 +1,103 @@
+
+Namespace myapp
+
+#Import "<std>"
+#Import "<mojo>"
+#Import "<mojox>"
+#Import "<admob>"
+
+Using std..
+Using mojo..
+Using mojox..
+Using admob..
+
+'Replace this with your AdMobID for banner ads, eg: "ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY"
+'
+Const AdUnitId:=""
+
+Class MyWindow Extends Window
+	
+	Field _adView:AdView
+
+	Method New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )
+
+		Super.New( title,width,height,flags )
+
+		'Scale up GUI a bit on mobile!
+		'
+		App.Theme.Scale=New Vec2f( 3,3 )
+		
+		'Create AdView instance
+		'		
+		_adView=New AdView( "banner","bottom",AdUnitId )
+		
+		_adView.Loading+=Lambda()
+		
+			Print "AdView Loading"
+		End
+		
+		_adView.Ready+=Lambda()
+		
+			Print "AdView Ready"
+		End
+
+		'Add some buttons to hide/show the ad.
+		'
+		Local tools:=New ToolBar
+					
+		tools.AddAction( "Show Ad" ).Triggered=Lambda()
+			
+			_adView.Visible=True
+		End
+					
+		tools.AddAction( "Hide Ad" ).Triggered=Lambda()
+			
+			_adView.Visible=False
+		End
+		
+		tools.AddAction( "Reload Ad" ).Triggered=Lambda()
+		
+			If _adView.State=AdState.Error
+				
+				_adView.Reload()	'Tries to load another ad. If State<>AdState.Error, this has no effect.
+			
+			Endif
+		
+		End
+
+					
+		ContentView=tools
+
+	End
+	
+	Method OnRender( canvas:Canvas ) Override
+	
+		RequestRender()
+		
+		Local state:="?????"
+		
+		Select _adView.State
+		Case AdState.Initial	'ad is starting up
+			state="Initial"
+		Case AdState.Loading	'ad is loading
+			state="Loading"
+		Case AdState.Ready		'ad is ready to be made visible
+			state="Ready"
+		Case AdState.Error		'ad error.
+			state="Error"
+		End
+
+		canvas.DrawText( state+"...",Width/2,Height/2,.5,.5 )
+		
+	End
+	
+End
+
+Function Main()
+
+	New AppInstance
+	
+	New MyWindow
+	
+	App.Run()
+End

+ 111 - 0
modules/admob/bananas/interstitial.monkey2

@@ -0,0 +1,111 @@
+
+Namespace myapp
+
+#Import "<std>"
+#Import "<mojo>"
+#Import "<mojox>"
+#Import "<admob>"
+
+Using std..
+Using mojo..
+Using mojox..
+Using admob..
+
+'Replace this with your AdMobID for interstitial ads, eg: "ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY"
+'
+Const AdUnitId:=""
+
+Class MyWindow Extends Window
+	
+	Field _adView:AdView
+
+	Method New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )
+
+		Super.New( title,width,height,flags )
+		
+		'Scale up GUI a bit on mobile!
+		'
+		App.Theme.Scale=New Vec2f( 3,3 )
+		
+		'Create AdView instance...
+		'
+		_adView=New AdView( "interstitial","top",AdUnitId )
+		
+		_adView.Loading+=Lambda()
+		
+			Print "AdView Loading"
+		End
+		
+		_adView.Ready+=Lambda()
+		
+			Print "AdView Ready"
+		End
+		
+		_adView.Error+=Lambda( error:Int )
+		
+			Print "AdView Error: error="+error
+		End
+		
+		'Add some buttons to hide/show the ad.
+		'
+		Local tools:=New ToolBar
+					
+		tools.AddAction( "Show ad" ).Triggered=Lambda()
+		
+			If _adView.State=AdState.Ready
+				
+				_adView.Visible=True	'Actually shows interstitial. App will suspend until user closes it. If State<>AdState.Ready, has no effect.
+			
+			Endif
+			
+		End
+
+		tools.AddAction( "Reload ad" ).Triggered=Lambda()
+		
+			If _adView.State=AdState.Error
+				
+				_adView.Reload()	'Tries to load another ad. If State<>AdState.Error, this has no effect.
+			
+			Endif
+		
+		End
+					
+		ContentView=tools
+
+	End
+	
+	Method OnRender( canvas:Canvas ) Override
+	
+		RequestRender()
+		
+'		Print "OnRender"
+		
+		Local state:="?????"
+		
+		Select _adView.State
+		Case AdState.Initial	'ad is starting up
+			state="Initial"
+		Case AdState.Loading	'ad is loading
+			state="Loading"
+		Case AdState.Ready		'ad is ready to be made visible
+			state="Ready"
+		Case AdState.Error		'ad error.
+			state="Error"
+		End
+
+		canvas.DrawText( state+"...",Width/2,Height/2,.5,.5 )
+		
+	End
+	
+End
+
+Function Main()
+
+	New AppInstance
+	
+	New MyWindow
+	
+	App.Run()
+End
+
+

+ 114 - 0
modules/admob/bananas/rewardedvideo.monkey2

@@ -0,0 +1,114 @@
+
+Namespace myapp
+
+#Import "<std>"
+#Import "<mojo>"
+#Import "<mojox>"
+#Import "<admob>"
+
+Using std..
+Using mojo..
+Using mojox..
+Using admob..
+
+'Replace this with your AdunitID for rewarded video ads, eg: "ca-app-pub-XXXXXXXXXXXXXXXX/YYYYYYYYYY"
+'
+Const AdUnitId:=""
+	
+Class MyWindow Extends Window
+	
+	Field _adView:admob.AdView
+
+	Method New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )
+
+		Super.New( title,width,height,flags )
+		
+		'Scale up GUI a bit on mobile!
+		'
+		App.Theme.Scale=New Vec2f( 3,3 )
+
+		'Create AdView instance...
+		'
+		_adView=New AdView( "rewardedvideo","top",AdUnitId )
+		
+		_adView.Loading+=Lambda()
+		
+			Print "AdView Loading"
+		End
+		
+		_adView.Ready+=Lambda()
+		
+			Print "AdView Ready"	'can make adView visible now!
+		End
+		
+		_adView.Error+=Lambda( error:Int )
+		
+			Print "AdView Error: error="+error
+		End
+		
+		_adView.Rewarded+=Lambda( type:String,amount:Int )
+
+			Print "AdView Rewarded: type='"+type+"' amount="+amount
+		End
+		
+		'Add some buttons to hide/show the ad.
+		'
+		Local tools:=New ToolBar
+					
+		tools.AddAction( "Show ad" ).Triggered=Lambda()
+		
+			If _adView.State=AdState.Ready
+		
+				_adView.Visible=True	'Starts rewarded video playing. If State<>AdState.Ready, this has no effect.
+			
+			Endif
+			
+		End
+		
+		tools.AddAction( "Reload ad" ).Triggered=Lambda()
+		
+			If _adView.State=AdState.Error
+				
+				_adView.Reload()	'Tries to load another ad. If State<>AdState.Error, this has no effect.
+			
+			Endif
+		
+		End
+					
+		ContentView=tools
+
+	End
+	
+	Method OnRender( canvas:Canvas ) Override
+	
+		RequestRender()
+		
+		Local state:="?????"
+		
+		Select _adView.State
+		Case AdState.Initial	'ad is starting
+			state="Initial"
+		Case AdState.Loading	'ad is loading
+			state="Loading"
+		Case AdState.Ready		'ad is ready to be made visible
+			state="Ready"
+		Case AdState.Error		'ad error.
+			state="Error"
+		End
+
+		canvas.DrawText( state+"...",Width/2,Height/2,.5,.5 )
+		
+	End
+	
+End
+
+Function Main()
+
+	New AppInstance
+	
+	New MyWindow
+	
+	App.Run()
+End
+
+

+ 7 - 0
modules/admob/module.json

@@ -0,0 +1,7 @@
+{
+	"module":"admob",
+	"about":"Admob wrapper",
+	"version":"1.0.06",
+	"depends":["jni","sdl2","mojo"]
+}
+

+ 110 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPBannerView.h

@@ -0,0 +1,110 @@
+//
+//  DFPBannerView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/DFPCustomRenderedBannerViewDelegate.h>
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+#import <GoogleMobileAds/GADAppEventDelegate.h>
+#import <GoogleMobileAds/GADBannerView.h>
+#import <GoogleMobileAds/GADCorrelator.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// The delegate of a GADAdLoader object must conform to this protocol to receive DFPBannerViews.
+@protocol DFPBannerAdLoaderDelegate<GADAdLoaderDelegate>
+
+/// Asks the delegate which banner ad sizes should be requested.
+- (NSArray<NSValue *> *)validBannerSizesForAdLoader:(GADAdLoader *)adLoader;
+
+/// Tells the delegate that a DFP banner ad was received.
+- (void)adLoader:(GADAdLoader *)adLoader didReceiveDFPBannerView:(DFPBannerView *)bannerView;
+
+@end
+
+/// The view that displays DoubleClick For Publishers banner ads.
+///
+/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (see
+/// GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If you
+/// request this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol.
+@interface DFPBannerView : GADBannerView
+
+/// Required value created on the DFP 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 DFP ad unit ID: @"/6499/example/banner"
+@property(nonatomic, copy, GAD_NULLABLE) NSString *adUnitID;
+
+/// Optional delegate that is notified when creatives send app events.
+@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAppEventDelegate> appEventDelegate;
+
+/// Optional delegate that is notified when creatives cause the banner to change size.
+@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAdSizeDelegate> adSizeDelegate;
+
+/// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are
+/// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined
+/// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize
+/// method.
+///
+/// Example:
+///
+///   <pre>
+///   NSArray *validSizes = @[
+///     NSValueFromGADAdSize(kGADAdSizeBanner),
+///     NSValueFromGADAdSize(kGADAdSizeLargeBanner)
+///   ];
+///
+///   bannerView.validAdSizes = validSizes;
+///   </pre>
+@property(nonatomic, copy, GAD_NULLABLE) NSArray *validAdSizes;
+
+/// Correlator object for correlating this object to other ad objects.
+@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, GAD_NULLABLE)
+    IBOutlet id<DFPCustomRenderedBannerViewDelegate> 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:
+///
+///   <pre>
+///   GADAdSize size1 = kGADAdSizeBanner;
+///   GADAdSize size2 = kGADAdSizeLargeBanner;
+///   [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL];
+///   </pre>
+- (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION
+                                 GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 29 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPBannerViewOptions.h

@@ -0,0 +1,29 @@
+//
+//  DFPBannerViewOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright © 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GADAdSizeDelegate.h>
+#import <GoogleMobileAds/GADAppEventDelegate.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Ad loader options for banner ads.
+@interface DFPBannerViewOptions : GADAdLoaderOptions
+
+/// Optional delegate that is notified if the loaded banner sends app events.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADAppEventDelegate> appEventDelegate;
+
+/// Optional delegate that is notified if the loaded banner changes size.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADAdSizeDelegate> adSizeDelegate;
+
+/// Whether the publisher will record impressions manually when the ad becomes visible to the user.
+@property(nonatomic, assign) BOOL enableManualImpressions;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 34 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedAd.h

@@ -0,0 +1,34 @@
+//
+//  DFPCustomRenderedAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2014 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Custom rendered ad. Your application renders the ad.
+@interface DFPCustomRenderedAd : NSObject
+
+/// The ad's HTML.
+@property(nonatomic, readonly, copy) NSString *adHTML;
+
+/// The base URL of the ad's HTML.
+@property(nonatomic, readonly, copy) NSURL *adBaseURL;
+
+/// Call this method when the user clicks the ad.
+- (void)recordClick;
+
+/// Call this method when the ad is visible to the user.
+- (void)recordImpression;
+
+/// Call this method after the ad has been rendered in a UIView object.
+- (void)finishedRenderingAdView:(UIView *)view;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 28 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedBannerViewDelegate.h

@@ -0,0 +1,28 @@
+//
+//  DFPCustomRenderedBannerViewDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2014 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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<NSObject>
+
+/// Called after ad data has been received. You must construct a banner from |customRenderedAd| and
+/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad has been rendered.
+- (void)bannerView:(DFPBannerView *)bannerView
+    didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 29 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPCustomRenderedInterstitialDelegate.h

@@ -0,0 +1,29 @@
+//
+//  DFPCustomRenderedInterstitialDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2014 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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<NSObject>
+
+/// Called after ad data has been received. You must construct an interstitial from
+/// |customRenderedAd| and call the |customRenderedAd| object's finishedRenderingAdView: method when
+/// the ad has been rendered.
+- (void)interstitial:(DFPInterstitial *)interstitial
+    didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 39 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPInterstitial.h

@@ -0,0 +1,39 @@
+//
+//  DFPInterstitial.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/DFPCustomRenderedInterstitialDelegate.h>
+#import <GoogleMobileAds/GADAppEventDelegate.h>
+#import <GoogleMobileAds/GADCorrelator.h>
+#import <GoogleMobileAds/GADInterstitial.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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
+/// ad in your application. Set this to the ID assigned for this placement. Ad units are important
+/// for targeting and stats.
+///
+/// Example DFP ad unit ID: @"/6499/example/interstitial"
+@property(nonatomic, readonly, copy) NSString *adUnitID;
+
+/// Correlator object for correlating this object to other ad objects.
+@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator;
+
+/// Optional delegate that is notified when creatives send app events.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADAppEventDelegate> appEventDelegate;
+
+/// Optional delegate object for custom rendered ads.
+@property(nonatomic, weak, GAD_NULLABLE)
+    id<DFPCustomRenderedInterstitialDelegate> customRenderedInterstitialDelegate;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 37 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/DFPRequest.h

@@ -0,0 +1,37 @@
+//
+//  DFPRequest.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2014 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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;
+
+/// Specifies optional parameters for ad requests.
+@interface DFPRequest : GADRequest
+
+/// Publisher provided user ID.
+@property(nonatomic, copy, GAD_NULLABLE) NSString *publisherProvidedID;
+
+/// Array of strings used to exclude specified categories in ad results.
+@property(nonatomic, copy, GAD_NULLABLE) NSArray *categoryExclusions;
+
+/// Key-value pairs used for custom targeting.
+@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 no longer affects ad correlation.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 25 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdChoicesView.h

@@ -0,0 +1,25 @@
+//
+//  GADAdChoicesView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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

+ 53 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoader.h

@@ -0,0 +1,53 @@
+//
+//  GADAdLoader.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdLoaderAdTypes.h>
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions
+/// subclasses.
+@interface GADAdLoaderOptions : NSObject
+@end
+
+/// Loads ads. See GADAdLoaderAdTypes.h for available ad types.
+@interface GADAdLoader : NSObject
+
+/// Object notified when an ad request succeeds or fails. Must conform to requested ad types'
+/// delegate protocols.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADAdLoaderDelegate> delegate;
+
+/// The ad loader's ad unit ID.
+@property(nonatomic, readonly) NSString *adUnitID;
+
+/// Indicates whether the ad loader is loading.
+@property(nonatomic, getter=isLoading, readonly) BOOL loading;
+
+/// Returns an initialized ad loader configured to load the specified ad types.
+///
+/// @param rootViewController The root view controller is used to present ad click actions.
+/// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types.
+/// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to
+/// use default options. See each ad type's header for available GADAdLoaderOptions subclasses.
+- (instancetype)initWithAdUnitID:(NSString *)adUnitID
+              rootViewController:(UIViewController *GAD_NULLABLE_TYPE)rootViewController
+                         adTypes:(NSArray<GADAdLoaderAdType> *)adTypes
+                         options:(NSArray<GADAdLoaderOptions *> *GAD_NULLABLE_TYPE)options;
+
+/// Loads the ad and informs the delegate of the outcome.
+- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 37 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoaderAdTypes.h

@@ -0,0 +1,37 @@
+//
+//  GADAdLoaderAdTypes.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+typedef NSString *GADAdLoaderAdType GAD_STRING_ENUM;
+
+/// Use with GADAdLoader to request native app install ads. To receive ads, the ad loader's delegate
+/// must conform to the GADNativeAppInstallAdLoaderDelegate protocol. See GADNativeAppInstallAd.h.
+///
+/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options.
+GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeAppInstall;
+
+/// Use with GADAdLoader to request native content ads. To receive ads, the ad loader's delegate
+/// must conform to the GADNativeContentAdLoaderDelegate protocol. See GADNativeContentAd.h.
+///
+/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options.
+GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeContent;
+
+/// Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader's
+/// delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. See
+/// GADNativeCustomTemplateAd.h.
+GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeCustomTemplate;
+
+/// Use with GADAdLoader to request DFP banner ads. To receive ads, the ad loader's delegate must
+/// conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h.
+GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeDFPBanner;
+
+GAD_ASSUME_NONNULL_END

+ 31 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdLoaderDelegate.h

@@ -0,0 +1,31 @@
+//
+//  GADAdLoaderDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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<NSObject>
+
+/// Called when adLoader fails to load an ad.
+- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error;
+
+@optional
+
+/// Called after adLoader has finished loading.
+- (void)adLoaderDidFinishLoading:(GADAdLoader *)adLoader;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 22 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdNetworkExtras.h

@@ -0,0 +1,22 @@
+//
+//  GADAdNetworkExtras.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// An object implementing this protocol contains information set by the publisher on the client
+/// device for a particular ad network.
+///
+/// Ad networks should create an 'extras' object implementing this protocol for their publishers to
+/// use.
+@protocol GADAdNetworkExtras<NSObject>
+@end
+
+GAD_ASSUME_NONNULL_END

+ 30 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdReward.h

@@ -0,0 +1,30 @@
+//
+//  GADAdReward.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Reward information for GADRewardBasedVideoAd ads.
+@interface GADAdReward : NSObject
+
+/// Type of the reward.
+@property(nonatomic, readonly, copy) NSString *type;
+
+/// Amount rewarded to the user.
+@property(nonatomic, readonly, copy) NSDecimalNumber *amount;
+
+/// Returns an initialized GADAdReward with the provided reward type and reward amount. rewardType
+/// and rewardAmount must not be nil.
+- (instancetype)initWithRewardType:(NSString *)rewardType
+                      rewardAmount:(NSDecimalNumber *)rewardAmount NS_DESIGNATED_INITIALIZER;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 117 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdSize.h

@@ -0,0 +1,117 @@
+//
+//  GADAdSize.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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.
+///
+/// Do not create a GADAdSize manually. Use one of the kGADAdSize constants. Treat GADAdSize as an
+/// opaque type. Do not access any fields directly. To obtain a concrete CGSize, use the function
+/// CGSizeFromGADAdSize().
+typedef struct GAD_BOXABLE GADAdSize GADAdSize;
+
+/// Ad size.
+///
+/// @see typedef GADAdSize
+struct GAD_BOXABLE GADAdSize {
+  CGSize size;       ///< The ad size. Don't modify this value directly.
+  NSUInteger flags;  ///< Reserved.
+};
+
+#pragma mark Standard Sizes
+
+/// iPhone and iPod Touch ad size. Typically 320x50.
+GAD_EXTERN GADAdSize const kGADAdSizeBanner;
+
+/// Taller version of kGADAdSizeBanner. Typically 320x100.
+GAD_EXTERN GADAdSize const kGADAdSizeLargeBanner;
+
+/// Medium Rectangle size for the iPad (especially in a UISplitView's left pane). Typically 300x250.
+GAD_EXTERN GADAdSize const kGADAdSizeMediumRectangle;
+
+/// Full Banner size for the iPad (especially in a UIPopoverController or in
+/// UIModalPresentationFormSheet). Typically 468x60.
+GAD_EXTERN GADAdSize const kGADAdSizeFullBanner;
+
+/// Leaderboard size for the iPad. Typically 728x90.
+GAD_EXTERN GADAdSize const kGADAdSizeLeaderboard;
+
+/// Skyscraper size for the iPad. Mediation only. AdMob/Google does not offer this size. Typically
+/// 120x600.
+GAD_EXTERN GADAdSize const kGADAdSizeSkyscraper;
+
+/// An ad size that spans the full width of the application in portrait orientation. The height is
+/// typically 50 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.
+GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait;
+
+/// An ad size that spans the full width of the application in landscape orientation. The height is
+/// typically 32 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.
+GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape;
+
+/// An ad size that spans the full width of its container, with a height dynamically determined by
+/// the ad.
+GAD_EXTERN GADAdSize const kGADAdSizeFluid;
+
+/// Invalid ad size marker.
+GAD_EXTERN GADAdSize const kGADAdSizeInvalid;
+
+#pragma mark Custom Sizes
+
+/// Returns a custom GADAdSize for the provided CGSize. Use this only if you require a non-standard
+/// size. Otherwise, use one of the standard size constants above.
+GAD_EXTERN GADAdSize GADAdSizeFromCGSize(CGSize size);
+
+/// Returns a custom GADAdSize that spans the full width of the application in portrait orientation
+/// with the height provided.
+GAD_EXTERN GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height);
+
+/// Returns a custom GADAdSize that spans the full width of the application in landscape orientation
+/// with the height provided.
+GAD_EXTERN GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height);
+
+#pragma mark Convenience Functions
+
+/// Returns YES if the two GADAdSizes are equal, otherwise returns NO.
+GAD_EXTERN BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2);
+
+/// Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returns
+/// CGSizeZero.
+GAD_EXTERN CGSize CGSizeFromGADAdSize(GADAdSize size);
+
+/// Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated by
+/// GADAdSizeFromCGSize.
+GAD_EXTERN BOOL IsGADAdSizeValid(GADAdSize size);
+
+/// Returns YES if |size| is a fluid ad size.
+GAD_EXTERN BOOL GADAdSizeIsFluid(GADAdSize size);
+
+/// Returns a NSString describing the provided GADAdSize.
+GAD_EXTERN NSString *NSStringFromGADAdSize(GADAdSize size);
+
+/// Returns an NSValue representing the GADAdSize.
+GAD_EXTERN NSValue *NSValueFromGADAdSize(GADAdSize size);
+
+/// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize.
+GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *value);
+
+#pragma mark Deprecated Macros
+
+#define GAD_SIZE_320x50 CGSizeFromGADAdSize(kGADAdSizeBanner)
+#define GAD_SIZE_320x100 CGSizeFromGADAdSize(kGADAdSizeLargeBanner)
+#define GAD_SIZE_300x250 CGSizeFromGADAdSize(kGADAdSizeMediumRectangle)
+#define GAD_SIZE_468x60 CGSizeFromGADAdSize(kGADAdSizeFullBanner)
+#define GAD_SIZE_728x90 CGSizeFromGADAdSize(kGADAdSizeLeaderboard)
+#define GAD_SIZE_120x600 CGSizeFromGADAdSize(kGADAdSizeSkyscraper)
+
+GAD_ASSUME_NONNULL_END

+ 26 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAdSizeDelegate.h

@@ -0,0 +1,26 @@
+//
+//  GADAdSizeDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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<NSObject>
+
+/// Called before the ad view changes to the new size.
+- (void)adView:(GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 35 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAppEventDelegate.h

@@ -0,0 +1,35 @@
+//
+//  GADAppEventDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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<NSObject>
+
+@optional
+
+/// Called when the banner receives an app event.
+- (void)adView:(GADBannerView *)banner
+    didReceiveAppEvent:(NSString *)name
+              withInfo:(NSString *GAD_NULLABLE_TYPE)info;
+
+/// Called when the interstitial receives an app event.
+- (void)interstitial:(GADInterstitial *)interstitial
+    didReceiveAppEvent:(NSString *)name
+              withInfo:(NSString *GAD_NULLABLE_TYPE)info;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 34 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAudioVideoManager.h

@@ -0,0 +1,34 @@
+//
+//  GADAudioVideoManager.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAudioVideoManagerDelegate.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Provides audio and video notifications and configurations management. Available only on iOS 7
+/// and above.
+///
+/// Don't create an instance of this class and use the one available from GADMobileAds
+/// sharedInstace's audioVideoManager.
+@interface GADAudioVideoManager : NSObject
+
+/// Delegate for receiving video and audio updates.
+@property(nonatomic, weak, nullable) id<GADAudioVideoManagerDelegate> delegate;
+
+/// Indicates whether the application wishes to manage audio session. If set as YES, the Google
+/// Mobile Ads SDK will stop managing AVAudioSession during the video playback lifecycle. If set as
+/// NO, the Google Mobile Ads SDK will control AVAudioSession. That may include: setting
+/// AVAudioSession's category to AVAudioSessionCategoryAmbient when all videos are muted, setting
+/// AVAudioSession's category to AVAudioSessionCategorySoloAmbient when any playing video becomes
+/// unmuted, and allowing background apps to continue playing sound when all videos rendered by
+/// Google Mobile Ads SDK are muted or have stopped playing.
+@property(nonatomic, assign) BOOL audioSessionIsApplicationManaged;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 39 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADAudioVideoManagerDelegate.h

@@ -0,0 +1,39 @@
+//
+//  GADAudioVideoManagerDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADAudioVideoManager;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+@protocol GADAudioVideoManagerDelegate<NSObject>
+
+@optional
+
+/// Tells the delegate that the Google Mobile Ads SDK will start playing a video. This method isn't
+/// called if another video rendered by Google Mobile Ads SDK is already playing.
+- (void)audioVideoManagerWillPlayVideo:(GADAudioVideoManager *)audioVideoManager;
+
+/// Tells the delegate that the Google Mobile Ads SDK has paused/stopped all video playback.
+- (void)audioVideoManagerDidPauseAllVideo:(GADAudioVideoManager *)audioVideoManager;
+
+/// Tells the delegate that at least one video rendered by the Google Mobile Ads SDK will play
+/// sound. Your app should stop playing sound when this method is called.
+- (void)audioVideoManagerWillPlayAudio:(GADAudioVideoManager *)audioVideoManager;
+
+/// Tells the delegate that all the video rendered by the Google Mobile Ads SDK has stopped playing
+/// sound. Your app can now resume any music playback or produce any kind of sound. Note that this
+/// message doesn't mean that all the video has stopped playing, just audio, so you shouldn't
+/// deactivate AVAudioSession's instance. Doing so can lead to unexpected video playback behavior.
+/// You may deactivate AVAudioSession only when all rendered video ads are paused or have finished
+/// playing, and 'audioVideoDidPauseAllVideo:' is called.
+- (void)audioVideoManagerDidStopPlayingAudio:(GADAudioVideoManager *)audioVideoManager;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 107 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADBannerView.h

@@ -0,0 +1,107 @@
+//
+//  GADBannerView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GADAdSizeDelegate.h>
+#import <GoogleMobileAds/GADBannerViewDelegate.h>
+#import <GoogleMobileAds/GADInAppPurchaseDelegate.h>
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// The view that displays banner ads. A minimum implementation to get an ad from within a
+/// UIViewController class is:
+///
+///   <pre>
+///   // 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]];
+///   </pre>
+@interface GADBannerView : UIView
+
+#pragma mark Initialization
+
+/// Initializes and returns a banner view with the specified ad size and origin relative to the
+/// banner's superview.
+- (instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin;
+
+/// 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
+
+/// 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
+/// tab-based application would be the UITabViewController.
+@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
+/// GADAdSizeFromCGSize method. If not using mediation, then changing the adSize after an ad has
+/// been shown will cause a new request (for an ad of the new size) to be sent. If using mediation,
+/// then a new request may not be sent.
+@property(nonatomic, assign) GADAdSize adSize;
+
+/// Optional delegate object that receives state change notifications from this GADBannerView.
+/// Typically this is a UIViewController.
+@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADBannerViewDelegate> delegate;
+
+/// Optional delegate that is notified when creatives cause the banner to change size.
+@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAdSizeDelegate> adSizeDelegate;
+
+#pragma mark Making an Ad Request
+
+/// Makes an ad request. The request object supplies targeting information.
+- (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.
+@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled;
+
+#pragma mark Mediation
+
+/// The ad network class name that fetched the current ad. Returns nil while the latest ad request
+/// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob
+/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom
+/// events, this property returns @"GADMAdapterCustomEvents".
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName;
+
+#pragma mark Deprecated
+
+/// Indicates if the currently displayed ad (or most recent failure) was a result of auto refreshing
+/// as specified on server. This property is set to NO after each loadRequest: method.
+@property(nonatomic, readonly, assign) BOOL hasAutoRefreshed GAD_DEPRECATED_ATTRIBUTE;
+
+/// Deprecated delegate. GADInAppPurchase has been deprecated.
+@property(nonatomic, weak, GAD_NULLABLE)
+    IBOutlet id<GADInAppPurchaseDelegate> inAppPurchaseDelegate GAD_DEPRECATED_ATTRIBUTE;
+
+/// The mediated ad network's underlying ad view. You may use this property to read the ad's actual
+/// size and adjust this banner view's frame origin. However, modifying the banner view's frame size
+/// triggers the Mobile Ads SDK to request a new ad. Only update the banner view's frame origin.
+@property(nonatomic, readonly, weak, GAD_NULLABLE)
+    UIView *mediatedAdView GAD_DEPRECATED_MSG_ATTRIBUTE("Use adNetworkClassName.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 53 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADBannerViewDelegate.h

@@ -0,0 +1,53 @@
+//
+//  GADBannerViewDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADBannerView;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Delegate methods for receiving GADBannerView state change messages such as ad request status
+/// and ad click lifecycle.
+@protocol GADBannerViewDelegate<NSObject>
+
+@optional
+
+#pragma mark Ad Request Lifecycle Notifications
+
+/// Tells the delegate that an ad request successfully received an ad. The delegate may want to add
+/// the banner view to the view hierarchy if it hasn't been added yet.
+- (void)adViewDidReceiveAd:(GADBannerView *)bannerView;
+
+/// Tells the delegate that an ad request failed. The failure is normally due to network
+/// connectivity or ad availablility (i.e., no fill).
+- (void)adView:(GADBannerView *)bannerView 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)adViewWillPresentScreen:(GADBannerView *)bannerView;
+
+/// Tells the delegate that the full screen view will be dismissed.
+- (void)adViewWillDismissScreen:(GADBannerView *)bannerView;
+
+/// Tells the delegate that the full screen view has been dismissed. The delegate should restart
+/// anything paused while handling adViewWillPresentScreen:.
+- (void)adViewDidDismissScreen:(GADBannerView *)bannerView;
+
+/// Tells the delegate that the user click will open another app, backgrounding the current
+/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:,
+/// are called immediately before this method is called.
+- (void)adViewWillLeaveApplication:(GADBannerView *)bannerView;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 23 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCorrelator.h

@@ -0,0 +1,23 @@
+//
+//  GADCorrelator.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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
+
+/// Resets the correlator to force a new set of correlated ads.
+- (void)reset;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 22 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCorrelatorAdLoaderOptions.h

@@ -0,0 +1,22 @@
+//
+//  GADCorrelatorAdLoaderOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GADCorrelator.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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, GAD_NULLABLE) GADCorrelator *correlator;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 40 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventBanner.h

@@ -0,0 +1,40 @@
+//
+//  GADCustomEventBanner.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GADCustomEventBannerDelegate.h>
+#import <GoogleMobileAds/GADCustomEventRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// The banner custom event protocol. Your banner custom event handler must implement this protocol.
+@protocol GADCustomEventBanner<NSObject>
+
+/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly.
+///
+/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The
+/// Google Mobile Ads SDK sets this property on instances of your class.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADCustomEventBannerDelegate> 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.
+- (void)requestBannerAd:(GADAdSize)adSize
+              parameter:(NSString *GAD_NULLABLE_TYPE)serverParameter
+                  label:(NSString *GAD_NULLABLE_TYPE)serverLabel
+                request:(GADCustomEventRequest *)request;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 68 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventBannerDelegate.h

@@ -0,0 +1,68 @@
+//
+//  GADCustomEventBannerDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+@protocol GADCustomEventBanner;
+
+/// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd:
+/// when there is an ad to show, or customEventBanner:didFailAd: when there is no ad to show.
+/// Otherwise, if enough time passed (several seconds) after the SDK called the requestBannerAd:
+/// method of your custom event, the mediation SDK will consider the request timed out, and move on
+/// to the next ad network.
+@protocol GADCustomEventBannerDelegate<NSObject>
+
+/// Your Custom Event object must call this when it receives or creates an ad view.
+- (void)customEventBanner:(id<GADCustomEventBanner>)customEvent didReceiveAd:(UIView *)view;
+
+/// Your Custom Event object must call this when it fails to receive or create the ad view. Pass
+/// along any error object sent from the ad network's SDK, or an NSError describing the error. Pass
+/// nil if not available.
+- (void)customEventBanner:(id<GADCustomEventBanner>)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
+/// server.
+- (void)customEventBannerWasClicked:(id<GADCustomEventBanner>)customEvent;
+
+/// The rootViewController that you set in GADBannerView. Use this UIViewController to show a modal
+/// view when a user taps on the ad.
+@property(nonatomic, readonly) UIViewController *viewControllerForPresentingModalView;
+
+/// When you call the following methods, the call will be propagated back to the
+/// GADBannerViewDelegate that you implemented and passed to GADBannerView.
+
+/// Your Custom Event should call this when the user taps an ad and a modal view appears.
+- (void)customEventBannerWillPresentModal:(id<GADCustomEventBanner>)customEvent;
+
+/// Your Custom Event should call this when the user dismisses the modal view and the modal view is
+/// about to go away.
+- (void)customEventBannerWillDismissModal:(id<GADCustomEventBanner>)customEvent;
+
+/// Your Custom Event should call this when the user dismisses the modal view and the modal view has
+/// gone away.
+- (void)customEventBannerDidDismissModal:(id<GADCustomEventBanner>)customEvent;
+
+/// Your Custom Event should call this method when a user action will result in App switching.
+- (void)customEventBannerWillLeaveApplication:(id<GADCustomEventBanner>)customEvent;
+
+#pragma mark Deprecated
+
+/// Deprecated. Use customEventBannerWasClicked:.
+- (void)customEventBanner:(id<GADCustomEventBanner>)customEvent
+        clickDidOccurInAd:(UIView *)view
+    GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 35 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventExtras.h

@@ -0,0 +1,35 @@
+//
+//  GADCustomEventExtras.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAdNetworkExtras.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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
+/// passed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial.
+@interface GADCustomEventExtras : NSObject<GADAdNetworkExtras>
+
+/// 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 *GAD_NULLABLE_TYPE)extras forLabel:(NSString *)label;
+
+/// Retrieve the extras for |label|.
+- (NSDictionary *GAD_NULLABLE_TYPE)extrasForLabel:(NSString *)label;
+
+/// Removes all the extras set on this instance.
+- (void)removeAllExtras;
+
+/// Returns all the extras set on this instance.
+- (NSDictionary *)allExtras;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 43 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventInterstitial.h

@@ -0,0 +1,43 @@
+//
+//  GADCustomEventInterstitial.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADCustomEventInterstitialDelegate.h>
+#import <GoogleMobileAds/GADCustomEventRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// The interstitial custom event protocol. Your interstitial custom event handler must implement
+/// this protocol.
+@protocol GADCustomEventInterstitial<NSObject>
+
+/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly.
+///
+/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The
+/// Google Mobile Ads SDK sets this property on instances of your class.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADCustomEventInterstitialDelegate> 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 *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
+/// after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate.
+- (void)presentFromRootViewController:(UIViewController *)rootViewController;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 62 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventInterstitialDelegate.h

@@ -0,0 +1,62 @@
+//
+//  GADCustomEventInterstitialDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+@protocol GADCustomEventInterstitial;
+
+/// Call back to this delegate in your custom event. You must call
+/// customEventInterstitialDidReceiveAd: when there is an ad to show, or
+/// customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed
+/// (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your
+/// custom event, the mediation SDK will consider the request timed out, and move on to the next ad
+/// network.
+@protocol GADCustomEventInterstitialDelegate<NSObject>
+
+/// Your Custom Event object must call this when it receives or creates an interstitial ad.
+- (void)customEventInterstitialDidReceiveAd:(id<GADCustomEventInterstitial>)customEvent;
+
+/// Your Custom Event object must call this when it fails to receive or create the ad. Pass along
+/// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if
+/// not available.
+- (void)customEventInterstitial:(id<GADCustomEventInterstitial>)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
+/// server.
+- (void)customEventInterstitialWasClicked:(id<GADCustomEventInterstitial>)customEvent;
+
+// When you call any of the following methods, the call will be propagated back to the
+// GADInterstitialDelegate that you implemented and passed to GADInterstitial.
+
+/// Your Custom Event should call this when the interstitial is being displayed.
+- (void)customEventInterstitialWillPresent:(id<GADCustomEventInterstitial>)customEvent;
+
+/// Your Custom Event should call this when the interstitial is about to be dismissed.
+- (void)customEventInterstitialWillDismiss:(id<GADCustomEventInterstitial>)customEvent;
+
+/// Your Custom Event should call this when the interstitial has been dismissed.
+- (void)customEventInterstitialDidDismiss:(id<GADCustomEventInterstitial>)customEvent;
+
+/// Your Custom Event should call this method when a user action will result in app switching.
+- (void)customEventInterstitialWillLeaveApplication:(id<GADCustomEventInterstitial>)customEvent;
+
+#pragma mark Deprecated
+
+/// Deprecated. Use customEventInterstitialDidReceiveAd:.
+- (void)customEventInterstitial:(id<GADCustomEventInterstitial>)customEvent
+                   didReceiveAd:(NSObject *)ad
+    GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 58 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventNativeAd.h

@@ -0,0 +1,58 @@
+//
+//  GADCustomEventNativeAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADCustomEventRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+@protocol GADCustomEventNativeAdDelegate;
+
+/// Native ad custom event protocol. Your native ad custom event handler class must conform to this
+/// protocol.
+@protocol GADCustomEventNativeAd<NSObject>
+
+/// 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;
+
+/// 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<GADCustomEventNativeAdDelegate> delegate;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 31 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventNativeAdDelegate.h

@@ -0,0 +1,31 @@
+//
+//  GADCustomEventNativeAdDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADCustomEventNativeAd.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeAd.h>
+
+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
+/// Google Mobile Ads SDK.
+@protocol GADCustomEventNativeAdDelegate<NSObject>
+
+/// Tells the delegate that the custom event ad request succeeded and loaded a native ad.
+- (void)customEventNativeAd:(id<GADCustomEventNativeAd>)customEventNativeAd
+    didReceiveMediatedNativeAd:(id<GADMediatedNativeAd>)mediatedNativeAd;
+
+/// Tells the delegate that the custom event ad request failed.
+- (void)customEventNativeAd:(id<GADCustomEventNativeAd>)customEventNativeAd
+     didFailToLoadWithError:(NSError *)error;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 19 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventParameters.h

@@ -0,0 +1,19 @@
+//
+//  GADCustomEventParameters.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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].
+GAD_EXTERN NSString *const GADCustomEventParametersServer;
+
+GAD_ASSUME_NONNULL_END

+ 59 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADCustomEventRequest.h

@@ -0,0 +1,59 @@
+//
+//  GADCustomEventRequest.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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
+
+/// User's gender set in GADRequest. If not specified, returns kGADGenderUnknown.
+@property(nonatomic, readonly, assign) GADGender userGender;
+
+/// User's birthday set in GADRequest. If not specified, returns nil.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDate *userBirthday;
+
+/// If the user's latitude, longitude, and accuracy are not specified, userHasLocation returns NO,
+/// and userLatitude, userLongitude, and userLocationAccuracyInMeters return 0.
+@property(nonatomic, readonly, assign) BOOL userHasLocation;
+
+/// 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, GAD_NULLABLE) NSString *userLocationDescription;
+
+/// Keywords set in GADRequest. Returns nil if no keywords are set.
+@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, 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

+ 36 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADDebugOptionsViewController.h

@@ -0,0 +1,36 @@
+//
+//  GADDebugOptionsViewController.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADDebugOptionsViewController;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Delegate for the GADDebugOptionsViewController.
+@protocol GADDebugOptionsViewControllerDelegate<NSObject>
+/// 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<GADDebugOptionsViewControllerDelegate> delegate;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 165 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADDynamicHeightSearchRequest.h

@@ -0,0 +1,165 @@
+//
+//  GADDynamicHeightSearchRequest.h
+//  GoogleMobileAds
+//
+//  Copyright © 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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

+ 23 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADExtras.h

@@ -0,0 +1,23 @@
+//
+//  GADExtras.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2012 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAdNetworkExtras.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Ad network extras sent to Google networks.
+@interface GADExtras : NSObject<GADAdNetworkExtras>
+
+/// Additional parameters to be sent to Google networks.
+@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *additionalParameters;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 90 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInAppPurchase.h

@@ -0,0 +1,90 @@
+//
+//  GADInAppPurchase.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2013 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <StoreKit/StoreKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+@protocol GADDefaultInAppPurchaseDelegate;
+
+#pragma mark - Default Purchase Flow
+
+/// The consumable in-app purchase item that has been purchased by the user. The purchase flow is
+/// handled by the Google Mobile Ads SDK.
+/// Instances of this class are created and passed to your in-app purchase delegate after the user
+/// has successfully paid for a product. Your code must correctly deliver the product to the user
+/// and then call the didCompletePurchase method to finish the transaction.
+
+GAD_DEPRECATED_ATTRIBUTE
+@interface GADDefaultInAppPurchase : NSObject
+
+/// Enables the default consumable product in-app purchase flow handled by the Google Mobile Ads
+/// SDK. The GADDefaultInAppPurchaseDelegate object is retained while the default purchase flow is
+/// enabled. This method adds a SKPaymentTransactionObserver to the default SKPaymentQueue.
+///
+/// Call this method early in your application to handle unfinished transactions from previous
+/// application sessions. For example, call this method in your application delegate's
+/// application:didFinishLaunchingWithOptions: method.
++ (void)enableDefaultPurchaseFlowWithDelegate:(id<GADDefaultInAppPurchaseDelegate>)delegate;
+
+/// Disables the default in-app purchase flow handled by the Google Mobile Ads SDK and releases the
+/// associated GADDefaultInAppPurchaseDelegate object.
++ (void)disableDefaultPurchaseFlow;
+
+/// The in-app purchase product ID.
+@property(nonatomic, readonly, copy) NSString *productID;
+
+/// The product quantity.
+@property(nonatomic, readonly, assign) NSInteger quantity;
+
+/// The purchased item's completed payment transaction. Your application can use this property's
+/// data to save a permanent record of the completed payment. The default purchase flow will finish
+/// the transaction on your behalf. Do not finish the transaction yourself.
+@property(nonatomic, readonly, strong) SKPaymentTransaction *paymentTransaction;
+
+/// The in-app purchase delegate object must first deliver the user's item and then call this
+/// method. Failure to call this method will result in duplicate purchase notifications.
+- (void)finishTransaction;
+
+@end
+
+#pragma mark - Custom Purchase Flow
+
+/// Enum of the different statuses resulting from processing a purchase.
+GAD_DEPRECATED_ATTRIBUTE
+typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) {
+  kGADInAppPurchaseStatusError = 0,          ///< Error occured while processing the purchase.
+  kGADInAppPurchaseStatusSuccessful = 1,     ///< Purchase was completed successfully.
+  kGADInAppPurchaseStatusCancel = 2,         ///< Purchase was cancelled by the user.
+  kGADInAppPurchaseStatusInvalidProduct = 3  ///< Error occured while looking up the product.
+};
+
+/// The in-app purchase item to be purchased with the purchase flow handled by you, the
+/// application developer.
+/// Instances of this class are created and passed to your GADInAppPurchaseDelegate object when
+/// users click a buy button. It is important to report the result of the purchase back to the SDK
+/// in order to track metrics about the transaction.
+GAD_DEPRECATED_ATTRIBUTE
+@interface GADInAppPurchase : NSObject
+
+/// The in-app purchase product ID.
+@property(nonatomic, readonly, copy) NSString *productID;
+
+/// The product quantity.
+@property(nonatomic, readonly, assign) NSInteger quantity;
+
+/// The GADInAppPurchaseDelegate object must call this method after handling the in-app purchase for
+/// both successful and unsuccessful purchase attempts. This method reports ad conversion and
+/// purchase status information to Google.
+- (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 50 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInAppPurchaseDelegate.h

@@ -0,0 +1,50 @@
+//
+//  GADInAppPurchaseDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2013 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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
+/// the purchased item then call the GADDefaultInAppPurchase object's finishTransaction method.
+GAD_DEPRECATED_ATTRIBUTE
+@protocol GADDefaultInAppPurchaseDelegate<NSObject>
+
+/// Called when the user successfully paid for a purchase. You must first deliver the purchased
+/// item to the user, then call defaultInAppPurchase's finishTransaction method.
+- (void)userDidPayForPurchase:(GADDefaultInAppPurchase *)defaultInAppPurchase;
+
+@optional
+
+/// Called when the user clicks on the buy button of an in-app purchase ad. Return YES if the
+/// default purchase flow should be started to purchase the item, otherwise return NO. If not
+/// implemented, defaults to YES.
+- (BOOL)shouldStartPurchaseForProductID:(NSString *)productID quantity:(NSInteger)quantity;
+
+@end
+
+#pragma mark - Custom Purchase Flow
+
+/// In-app purchase delegate protocol for custom purchase handling. The delegate must handle the
+/// product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method.
+GAD_DEPRECATED_ATTRIBUTE
+@protocol GADInAppPurchaseDelegate<NSObject>
+
+/// Called when the user clicks on the buy button of an in-app purchase ad. After the receiver
+/// handles the purchase, it must call the GADInAppPurchase object's reportPurchaseStatus: method.
+- (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 88 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInterstitial.h

@@ -0,0 +1,88 @@
+//
+//  GADInterstitial.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADInAppPurchaseDelegate.h>
+#import <GoogleMobileAds/GADInterstitialDelegate.h>
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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
+
+/// Initializes an interstitial with an ad unit created on the AdMob website. Create a new ad unit
+/// for every unique placement of an ad in your application. Set this to the ID assigned for this
+/// placement. Ad units are important for targeting and statistics.
+///
+/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789"
+- (instancetype)initWithAdUnitID:(NSString *)adUnitID NS_DESIGNATED_INITIALIZER;
+
+#pragma mark Pre-Request
+
+/// Required value passed in with initWithAdUnitID:.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adUnitID;
+
+/// Optional delegate object that receives state change notifications from this GADInterstitalAd.
+@property(nonatomic, weak, GAD_NULLABLE) id<GADInterstitialDelegate> delegate;
+
+#pragma mark Making an Ad Request
+
+/// Makes an interstitial ad request. Additional targeting options can be supplied with a request
+/// object. Only one interstitial request is allowed at a time.
+///
+/// This is best to do several seconds before the interstitial is needed to preload its content.
+/// Then when transitioning between view controllers show the interstital with
+/// presentFromViewController.
+- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request;
+
+#pragma mark Post-Request
+
+/// Returns YES if the interstitial is ready to be displayed. The delegate's
+/// interstitialAdDidReceiveAd: will be called after this property switches from NO to YES.
+@property(nonatomic, readonly, assign) BOOL isReady;
+
+/// Returns YES if this object has already been presented. Interstitial objects can only be used
+/// once even with different requests.
+@property(nonatomic, readonly, assign) BOOL hasBeenUsed;
+
+/// 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 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:
+/// has been received.
+///
+/// Set rootViewController to the current view controller at the time this method is called. If your
+/// application does not use view controllers pass in nil and your views will be removed from the
+/// window to show the interstitial and restored when done. After the interstitial has been removed,
+/// the delegate's interstitialDidDismissScreen: will be called.
+- (void)presentFromRootViewController:(UIViewController *)rootViewController;
+
+#pragma mark Deprecated
+
+/// Deprecated delegate. GADInAppPurchase has been deprecated.
+@property(nonatomic, weak, GAD_NULLABLE)
+    id<GADInAppPurchaseDelegate> inAppPurchaseDelegate GAD_DEPRECATED_ATTRIBUTE;
+
+/// Deprecated intializer. Use initWithAdUnitID: instead.
+- (instancetype)init GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID:.");
+
+/// Deprecated setter, use initWithAdUnitID: instead.
+- (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

+ 58 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADInterstitialDelegate.h

@@ -0,0 +1,58 @@
+//
+//  GADInterstitialDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADInterstitial;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad
+/// requests succeeding/failing.
+@protocol GADInterstitialDelegate<NSObject>
+
+@optional
+
+#pragma mark Ad Request Lifecycle Notifications
+
+/// Called when an interstitial ad request succeeded. Show it at the next transition point in your
+/// application such as when transitioning between view controllers.
+- (void)interstitialDidReceiveAd:(GADInterstitial *)ad;
+
+/// Called when an interstitial ad request completed without an interstitial to
+/// show. This is common since interstitials are shown sparingly to users.
+- (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error;
+
+#pragma mark Display-Time Lifecycle Notifications
+
+/// Called just before presenting an interstitial. After this method finishes the interstitial will
+/// animate onto the screen. Use this opportunity to stop animations and save the state of your
+/// application in case the user leaves while the interstitial is on screen (e.g. to visit the App
+/// Store from a link on the interstitial).
+- (void)interstitialWillPresentScreen:(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;
+
+/// Called just after dismissing an interstitial and it has animated off the screen.
+- (void)interstitialDidDismissScreen:(GADInterstitial *)ad;
+
+/// Called just before the application will background or terminate because the user clicked on an
+/// ad that will launch another application (such as the App Store). The normal
+/// UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately
+/// before this.
+- (void)interstitialWillLeaveApplication:(GADInterstitial *)ad;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 29 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMediaView.h

@@ -0,0 +1,29 @@
+//
+//  GADMediaView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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

+ 59 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMobileAds.h

@@ -0,0 +1,59 @@
+//
+//  GADMobileAds.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAudioVideoManager.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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.
++ (void)disableAutomatedInAppPurchaseReporting;
+
+/// Disables automated SDK crash reporting. If not called, the SDK records the original exception
+/// handler if available and registers a new exception handler. The new exception handler only
+/// reports SDK related exceptions and calls the recorded original exception handler.
++ (void)disableSDKCrashReporting;
+
+/// The application's audio volume. Affects audio volumes of all ads relative to other audio output.
+/// Valid ad volume values range from 0.0 (silent) to 1.0 (current device volume). Use this method
+/// only if your application has its own volume controls (e.g., custom music or sound effect
+/// volumes). Defaults to 1.0.
+@property(nonatomic, assign) float applicationVolume;
+
+/// Indicates 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;
+
+/// Manages the Google Mobile Ads SDK's audio and video settings.
+@property(nonatomic, readonly, strong) GADAudioVideoManager *audioVideoManager;
+
+/// 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

+ 27 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADMultipleAdsAdLoaderOptions.h

@@ -0,0 +1,27 @@
+//
+//  GADMultipleAdsAdLoaderOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2017 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Ad loader options for requesting multiple ads. Requesting multiple ads in a single request is
+/// currently only available for native app install ads and native content ads.
+@interface GADMultipleAdsAdLoaderOptions : GADAdLoaderOptions
+
+/// Number of ads the GADAdLoader should attempt to return for the request. By default, numberOfAds
+/// is one. Requests are invalid and will fail if numberOfAds is less than one. If numberOfAds
+/// exceeds the maximum limit (5), only the maximum number of ads are requested.
+///
+/// The ad loader makes at least one and up to numberOfAds calls to the "ad received" and
+/// -didFailToReceiveAdWithError: methods found in GADAdLoaderDelegate and its extensions, followed
+/// by a single call to -adLoaderDidFinishLoading: once loading is finished.
+@property(nonatomic) NSInteger numberOfAds;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 36 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAd.h

@@ -0,0 +1,36 @@
+//
+//  GADNativeAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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, GAD_NULLABLE) id<GADNativeAdDelegate> delegate;
+
+/// Root view controller for handling ad actions.
+@property(nonatomic, weak, GAD_NULLABLE) UIViewController *rootViewController;
+
+/// Dictionary of assets which aren't processed by the receiver.
+@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, GAD_NULLABLE) NSString *adNetworkClassName;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 57 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdDelegate.h

@@ -0,0 +1,57 @@
+//
+//  GADNativeAdDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADNativeAd;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Identifies native ad assets.
+@protocol GADNativeAdDelegate<NSObject>
+
+@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
+/// clicking on an ad. Use this opportunity to stop animations, time sensitive interactions, etc.
+///
+/// Normally the user looks at the ad, dismisses it, and control returns to your application with
+/// the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an
+/// App Store link, your application will end. The next method called will be the
+/// applicationWillResignActive: of your UIApplicationDelegate object.Immediately after that,
+/// nativeAdWillLeaveApplication: is called.
+- (void)nativeAdWillPresentScreen:(GADNativeAd *)nativeAd;
+
+/// Called just before dismissing a full screen view.
+- (void)nativeAdWillDismissScreen:(GADNativeAd *)nativeAd;
+
+/// Called just after dismissing a full screen view. Use this opportunity to restart anything you
+/// may have stopped as part of nativeAdWillPresentScreen:.
+- (void)nativeAdDidDismissScreen:(GADNativeAd *)nativeAd;
+
+/// Called just before the application will go to the background or terminate due to an ad action
+/// that will launch another application (such as the App Store). The normal UIApplicationDelegate
+/// methods, like applicationDidEnterBackground:, will be called immediately before this.
+- (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 24 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImage+Mediation.h

@@ -0,0 +1,24 @@
+//
+//  GADNativeAdImage+Mediation.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADNativeAdImage.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Provides additional GADNativeAdImage initializers.
+@interface GADNativeAdImage (MediationAdditions)
+
+/// Initializes and returns a native ad image object with the provided image.
+- (instancetype)initWithImage:(UIImage *)image;
+
+/// Initializes and returns a native ad image object with the provided image URL and image scale.
+- (instancetype)initWithURL:(NSURL *)URL scale:(CGFloat)scale;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 29 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImage.h

@@ -0,0 +1,29 @@
+//
+//  GADNativeAdImage.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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, GAD_NULLABLE) UIImage *image;
+
+/// The image's URL.
+@property(nonatomic, readonly, copy) NSURL *imageURL;
+
+/// The image's scale.
+@property(nonatomic, readonly, assign) CGFloat scale;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 37 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdImageAdLoaderOptions.h

@@ -0,0 +1,37 @@
+//
+//  GADNativeAdImageAdLoaderOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Native ad image orientation preference.
+typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) {
+  GADNativeAdImageAdLoaderOptionsOrientationAny = 1,       ///< No orientation preference.
+  GADNativeAdImageAdLoaderOptionsOrientationPortrait = 2,  ///< Prefer portrait images.
+  GADNativeAdImageAdLoaderOptionsOrientationLandscape = 3  ///< Prefer landscape images.
+};
+
+/// Ad loader options for native ad image settings.
+@interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions
+
+/// Indicates if image asset content should be loaded by the SDK. If set to YES, the SDK will not
+/// load image asset content and native ad image URLs can be used to fetch content. Defaults to NO,
+/// image assets are loaded by the SDK.
+@property(nonatomic, assign) BOOL disableImageLoading;
+
+/// Indicates if multiple images should be loaded for each asset. Defaults to NO.
+@property(nonatomic, assign) BOOL shouldRequestMultipleImages;
+
+/// Indicates preferred image orientation. Defaults to
+/// GADNativeAdImageAdLoaderOptionsOrientationAny.
+@property(nonatomic, assign) GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 29 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAdViewAdOptions.h

@@ -0,0 +1,29 @@
+//
+//  GADNativeAdViewAdOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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

+ 118 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAppInstallAd.h

@@ -0,0 +1,118 @@
+//
+//  GADNativeAppInstallAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdChoicesView.h>
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+#import <GoogleMobileAds/GADMediaView.h>
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GADNativeAdImage.h>
+#import <GoogleMobileAds/GADNativeAppInstallAdAssetIDs.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// 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
+/// GADNativeAppInstallAdLoaderDelegate protocol.
+@interface GADNativeAppInstallAd : GADNativeAd
+
+#pragma mark - Must be displayed
+
+/// App title.
+@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, GAD_NULLABLE) NSString *callToAction;
+/// Application icon.
+@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *icon;
+
+#pragma mark - Recommended to display
+
+/// App description.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body;
+/// The app store name. For example, "App Store".
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *store;
+/// String representation of the app's price.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *price;
+/// Array of GADNativeAdImage objects related to the advertised application.
+@property(nonatomic, readonly, strong, GAD_NULLABLE) NSArray *images;
+/// App store rating (0 to 5).
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDecimalNumber *starRating;
+/// Video controller for controlling video playback in GADNativeAppInstallAdView's mediaView.
+@property(nonatomic, strong, readonly) GADVideoController *videoController;
+
+/// Registers ad view and asset views with this native ad.
+/// @param assetViews Dictionary of asset views keyed by asset IDs.
+- (void)registerAdView:(UIView *)adView
+            assetViews:(NSDictionary<GADNativeAppInstallAssetID, UIView *> *)assetViews
+    GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:");
+
+/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad.
+/// Media view shouldn't be registered as clickable.
+/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs.
+/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset
+///        IDs.
+- (void)registerAdView:(UIView *)adView
+       clickableAssetViews:(NSDictionary<GADNativeAppInstallAssetID, UIView *> *)clickableAssetViews
+    nonclickableAssetViews:
+        (NSDictionary<GADNativeAppInstallAssetID, UIView *> *)nonclickableAssetViews;
+
+/// Unregisters ad view from this native ad. The corresponding asset views will also be
+/// unregistered.
+- (void)unregisterAdView;
+
+@end
+
+#pragma mark - Protocol and constants
+
+/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAppInstallAd
+/// ads.
+@protocol GADNativeAppInstallAdLoaderDelegate<GADAdLoaderDelegate>
+/// Called when a native app install ad is received.
+- (void)adLoader:(GADAdLoader *)adLoader
+    didReceiveNativeAppInstallAd:(GADNativeAppInstallAd *)nativeAppInstallAd;
+@end
+
+#pragma mark - Native App Install Ad View
+
+/// Base class for app install ad views. Your app install ad view must be a subclass of this class
+/// and must call superclass methods for all overriden methods.
+@interface GADNativeAppInstallAdView : UIView
+
+/// This property must point to the native app install ad object rendered by this ad view.
+@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

+ 30 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeAppInstallAdAssetIDs.h

@@ -0,0 +1,30 @@
+//
+//  GADNativeAppInstallAdAssetIDs.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2017 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+typedef NSString *GADNativeAppInstallAssetID GAD_STRING_ENUM;
+
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallHeadlineAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallCallToActionAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallIconAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBodyAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStoreAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallPriceAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallImageAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStarRatingAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionIconAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionTextAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallMediaViewAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAdChoicesViewAsset;
+GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBackgroundAsset;
+
+GAD_ASSUME_NONNULL_END

+ 111 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeContentAd.h

@@ -0,0 +1,111 @@
+//
+//  GADNativeContentAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdChoicesView.h>
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+#import <GoogleMobileAds/GADMediaView.h>
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GADNativeAdImage.h>
+#import <GoogleMobileAds/GADNativeContentAdAssetIDs.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+#pragma mark - Native Content Ad Assets
+
+/// 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 GADNativeContentAdLoaderDelegate
+/// protocol.
+@interface GADNativeContentAd : GADNativeAd
+
+#pragma mark - Must be displayed
+
+/// Primary text headline.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *headline;
+/// Secondary text.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body;
+
+#pragma mark - Recommended to display
+
+/// Large images.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSArray *images;
+/// Small logo image.
+@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *logo;
+/// Text that encourages user to take some action with the ad.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *callToAction;
+/// Identifies the advertiser. For example, the advertiser’s name or visible URL.
+@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *advertiser;
+/// Video controller for controlling video playback in GADNativeContentAdView's mediaView.
+@property(nonatomic, strong, readonly) GADVideoController *videoController;
+
+/// Registers ad view and asset views created with this native ad.
+/// @param assetViews Dictionary of asset views keyed by asset IDs.
+- (void)registerAdView:(UIView *)adView
+            assetViews:(NSDictionary<GADNativeContentAdAssetID, UIView *> *)assetViews
+    GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:");
+
+/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad.
+/// Media view shouldn't be registered as clickable.
+/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs.
+/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset
+///        IDs.
+- (void)registerAdView:(UIView *)adView
+       clickableAssetViews:(NSDictionary<GADNativeContentAdAssetID, UIView *> *)clickableAssetViews
+    nonclickableAssetViews:
+        (NSDictionary<GADNativeContentAdAssetID, UIView *> *)nonclickableAssetViews;
+
+/// Unregisters ad view from this native ad. The corresponding asset views will also be
+/// unregistered.
+- (void)unregisterAdView;
+
+@end
+
+#pragma mark - Protocol and constants
+
+/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeContentAd ads.
+@protocol GADNativeContentAdLoaderDelegate<GADAdLoaderDelegate>
+/// Called when native content is received.
+- (void)adLoader:(GADAdLoader *)adLoader
+    didReceiveNativeContentAd:(GADNativeContentAd *)nativeContentAd;
+@end
+
+#pragma mark - Native Content Ad View
+
+/// Base class for content ad views. Your content ad view must be a subclass of this class and must
+/// call superclass methods for all overriden methods.
+@interface GADNativeContentAdView : UIView
+
+/// This property must point to the native content ad object rendered by this ad view.
+@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

+ 28 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeContentAdAssetIDs.h

@@ -0,0 +1,28 @@
+//
+//  GADNativeContentAdAssetIDs.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2017 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+typedef NSString *GADNativeContentAdAssetID GAD_STRING_ENUM;
+
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentHeadlineAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBodyAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentCallToActionAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdvertiserAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentImageAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentLogoAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionIconAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionTextAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentMediaViewAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdChoicesViewAsset;
+GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBackgroundAsset;
+
+GAD_ASSUME_NONNULL_END

+ 94 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeCustomTemplateAd.h

@@ -0,0 +1,94 @@
+//
+//  GADNativeCustomTemplateAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+#import <GoogleMobileAds/GADMediaView.h>
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GADNativeAdImage.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Native ad custom click handler block. |assetID| is the ID of asset that has received a click.
+typedef void (^GADNativeAdCustomClickHandler)(NSString *assetID);
+
+/// Asset key for the GADMediaView asset view.
+GAD_EXTERN NSString *const GADNativeCustomTemplateAdMediaViewKey;
+
+/// Native custom template ad. To request this ad type, you need to pass
+/// kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in
+/// 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.
+@property(nonatomic, readonly) NSString *templateID;
+
+/// Array of available asset keys.
+@property(nonatomic, readonly) NSArray<NSString *> *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;
+
+/// Custom click handler. Set this property only if this template ad is configured with a custom
+/// click action, otherwise set it to nil. If this property is set to a non-nil value, the ad's
+/// built-in click actions are ignored and |customClickHandler| is executed when a click on the
+/// asset is received.
+@property(atomic, copy, GAD_NULLABLE) GADNativeAdCustomClickHandler customClickHandler;
+
+/// Returns the native ad image corresponding to the specified key or nil if the image is not
+/// available.
+- (GADNativeAdImage *GAD_NULLABLE_TYPE)imageForKey:(NSString *)key;
+
+/// Returns the string corresponding to the specified key or nil if the string is not available.
+- (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. If this ad is configured with a custom click action, ensure the receiver's
+/// customClickHandler property is set before calling this method.
+- (void)performClickOnAssetWithKey:(NSString *)assetKey;
+
+/// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the
+/// first impression is recorded.
+- (void)recordImpression;
+
+/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user
+/// interacted with. Provide |customClickHandler| only if this template is configured with a custom
+/// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are
+/// ignored and |customClickHandler| is executed after recording the click.
+///
+/// This method is deprecated. See performClickOnAssetWithKey: API.
+- (void)performClickOnAssetWithKey:(NSString *)assetKey
+                customClickHandler:(dispatch_block_t GAD_NULLABLE_TYPE)customClickHandler
+    GAD_DEPRECATED_MSG_ATTRIBUTE("Use performClickOnAssetWithKey:.");
+
+@end
+
+#pragma mark - Loading Protocol
+
+/// The delegate of a GADAdLoader object implements this protocol to receive
+/// GADNativeCustomTemplateAd ads.
+@protocol GADNativeCustomTemplateAdLoaderDelegate<GADAdLoaderDelegate>
+
+/// Called when requesting an ad. Asks the delegate for an array of custom template ID strings.
+- (NSArray<NSString *> *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader;
+
+/// Tells the delegate that a native custom template ad was received.
+- (void)adLoader:(GADAdLoader *)adLoader
+    didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 96 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeExpressAdView.h

@@ -0,0 +1,96 @@
+//
+//  GADNativeExpressAdView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GADNativeExpressAdViewDelegate.h>
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// The view that displays native ads. A minimum implementation to get an ad from within a
+/// UIViewController class is:
+///
+///   <pre>
+///   // 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]];
+///   </pre>
+@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<GADNativeExpressAdViewDelegate> 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

+ 54 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADNativeExpressAdViewDelegate.h

@@ -0,0 +1,54 @@
+//
+//  GADNativeExpressAdViewDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADNativeExpressAdView;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Delegate methods for receiving GADNativeExpressAdView state change messages such as ad request
+/// status and ad click lifecycle.
+@protocol GADNativeExpressAdViewDelegate<NSObject>
+
+@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

+ 127 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRequest.h

@@ -0,0 +1,127 @@
+//
+//  GADRequest.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <CoreGraphics/CoreGraphics.h>
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAdNetworkExtras.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Add this constant to the testDevices property's array to receive test ads on the simulator.
+GAD_EXTERN const id kGADSimulatorID;
+
+/// Genders to help deliver more relevant ads.
+typedef NS_ENUM(NSInteger, GADGender) {
+  kGADGenderUnknown,  ///< Unknown gender.
+  kGADGenderMale,     ///< Male gender.
+  kGADGenderFemale    ///< Female gender.
+};
+
+/// Specifies optional parameters for ad requests.
+@interface GADRequest : NSObject<NSCopying>
+
+/// Returns a default request.
++ (instancetype)request;
+
+#pragma mark Additional Parameters For Ad Networks
+
+/// Ad networks may have additional parameters they accept. To pass these parameters to them, create
+/// the ad network extras object for that network, fill in the parameters, and register it here. The
+/// ad network should have a header defining the interface for the 'extras' object to create. All
+/// networks will have access to the basic settings you've set in this GADRequest (gender, birthday,
+/// testing mode, etc.). If you register an extras object that is the same class as one you have
+/// registered before, the previous extras will be overwritten.
+- (void)registerAdNetworkExtras:(id<GADAdNetworkExtras>)extras;
+
+/// Returns the network extras defined for an ad network.
+- (id<GADAdNetworkExtras> GAD_NULLABLE_TYPE)adNetworkExtrasFor:(Class<GADAdNetworkExtras>)aClass;
+
+/// Removes the extras for an ad network. |aClass| is the class which represents that network's
+/// extras type.
+- (void)removeAdNetworkExtrasFor:(Class<GADAdNetworkExtras>)aClass;
+
+#pragma mark Collecting SDK Information
+
+/// Returns the version of the SDK.
++ (NSString *)sdkVersion;
+
+#pragma mark Testing
+
+/// Test ads will be returned for devices with device IDs specified in this array.
+@property(nonatomic, copy, GAD_NULLABLE) NSArray *testDevices;
+
+#pragma mark User Information
+
+/// Provide the user's gender to increase ad relevancy.
+@property(nonatomic, assign) GADGender gender;
+
+/// Provide the user's birthday to increase ad relevancy.
+@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday;
+
+/// The user's current location may be used to deliver more relevant ads. However do not use Core
+/// Location just for advertising, make sure it is used for more beneficial reasons as well. It is
+/// both a good idea and part of Apple's guidelines.
+- (void)setLocationWithLatitude:(CGFloat)latitude
+                      longitude:(CGFloat)longitude
+                       accuracy:(CGFloat)accuracyInMeters;
+
+/// [Optional] This method allows you to specify whether you would like your app to be treated as
+/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA),
+/// http:///business.ftc.gov/privacy-and-security/childrens-privacy.
+///
+/// If you call this method with YES, you are indicating that your app should be treated as
+/// child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA). If you call
+/// this method with NO, you are indicating that your app should not be treated as child-directed
+/// for purposes of the Children’s Online Privacy Protection Act (COPPA). If you do not call this
+/// method, ad requests will include no indication of how you would like your app treated with
+/// respect to COPPA.
+///
+/// By setting this method, you certify that this notification is accurate and you are authorized to
+/// act on behalf of the owner of the app. You understand that abuse of this setting may result in
+/// termination of your Google account.
+///
+/// It may take some time for this designation to be fully implemented in applicable Google
+/// services. This designation will only apply to ad requests for which you have set this method.
+- (void)tagForChildDirectedTreatment:(BOOL)childDirectedTreatment;
+
+#pragma mark Contextual Information
+
+/// Array of keyword strings. Keywords are words or phrases describing the current user activity
+/// such as @"Sports Scores" or @"Football". Set this property to nil to clear the keywords.
+@property(nonatomic, copy, 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, GAD_NULLABLE) NSString *contentURL;
+
+#pragma mark Request Agent Information
+
+/// String that identifies the ad request's origin. Third party libraries that reference the Mobile
+/// Ads SDK should set this property to denote the platform from which the ad request originated.
+/// For example, a third party ad network called "CoolAds network" that is mediating requests to the
+/// Mobile Ads SDK should set this property as "CoolAds".
+@property(nonatomic, copy, GAD_NULLABLE) NSString *requestAgent;
+
+#pragma mark Deprecated Methods
+
+/// Provide the user's birthday to increase ad relevancy.
+- (void)setBirthdayWithMonth:(NSInteger)month
+                         day:(NSInteger)day
+                        year:(NSInteger)year
+    GAD_DEPRECATED_MSG_ATTRIBUTE(" use the birthday property.");
+
+/// 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 *GAD_NULLABLE_TYPE)locationDescription
+    GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:.");
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 70 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRequestError.h

@@ -0,0 +1,70 @@
+//
+//  GADRequestError.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@class GADRequest;
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Google AdMob Ads error domain.
+GAD_EXTERN NSString *const kGADErrorDomain;
+
+/// NSError codes for GAD error domain.
+typedef NS_ENUM(NSInteger, GADErrorCode) {
+  /// The ad request is invalid. The localizedFailureReason error description will have more
+  /// details. Typically this is because the ad did not have the ad unit ID or root view
+  /// controller set.
+  kGADErrorInvalidRequest,
+
+  /// The ad request was successful, but no ad was returned.
+  kGADErrorNoFill,
+
+  /// There was an error loading data from the network.
+  kGADErrorNetworkError,
+
+  /// The ad server experienced a failure processing the request.
+  kGADErrorServerError,
+
+  /// The current device's OS is below the minimum required version.
+  kGADErrorOSVersionTooLow,
+
+  /// The request was unable to be loaded before being timed out.
+  kGADErrorTimeout,
+
+  /// Will not send request because the interstitial object has already been used.
+  kGADErrorInterstitialAlreadyUsed,
+
+  /// The mediation response was invalid.
+  kGADErrorMediationDataError,
+
+  /// Error finding or creating a mediation ad network adapter.
+  kGADErrorMediationAdapterError,
+
+  /// The mediation request was successful, but no ad was returned from any ad networks.
+  kGADErrorMediationNoFill,
+
+  /// Attempting to pass an invalid ad size to an adapter.
+  kGADErrorMediationInvalidAdSize,
+
+  /// Internal error.
+  kGADErrorInternalError,
+
+  /// Invalid argument error.
+  kGADErrorInvalidArgument,
+
+  /// Received invalid response.
+  kGADErrorReceivedInvalidResponse
+};
+
+/// Represents the error generated due to invalid request parameters.
+@interface GADRequestError : NSError
+@end
+
+GAD_ASSUME_NONNULL_END

+ 52 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRewardBasedVideoAd.h

@@ -0,0 +1,52 @@
+//
+//  GADRewardBasedVideoAd.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+@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, GAD_NULLABLE) id<GADRewardBasedVideoAdDelegate> 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;
+
+/// A unique identifier used to identify the user when making server-to-server reward callbacks.
+/// This value is used at both request time and during ad display. New values must only be set
+/// before ad requests.
+@property(nonatomic, copy, GAD_NULLABLE) NSString *userIdentifier;
+
+/// Returns the shared GADRewardBasedVideoAd instance.
++ (GADRewardBasedVideoAd *)sharedInstance;
+
+/// Initiates the request to fetch the reward based video ad. The |request| object supplies ad
+/// targeting information and must not be nil. The adUnitID is the ad unit id used for fetching an
+/// ad and must not be nil.
+- (void)loadRequest:(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

+ 49 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADRewardBasedVideoAdDelegate.h

@@ -0,0 +1,49 @@
+//
+//  GADRewardBasedVideoAdDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GoogleMobileAds/GADAdReward.h>
+#import <GoogleMobileAds/GADRewardBasedVideoAd.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Delegate for receiving state change messages from a GADRewardBasedVideoAd such as ad requests
+/// succeeding/failing.
+@protocol GADRewardBasedVideoAdDelegate<NSObject>
+
+@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 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 opened.
+- (void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
+
+/// Tells the delegate that the reward based video ad started playing.
+- (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd;
+
+/// 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;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 27 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADSearchBannerView.h

@@ -0,0 +1,27 @@
+//
+//  GADSearchBannerView.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdSizeDelegate.h>
+#import <GoogleMobileAds/GADBannerView.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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<GADAdSizeDelegate> adSizeDelegate;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 77 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADSearchRequest.h

@@ -0,0 +1,77 @@
+//
+//  GADSearchRequest.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2011 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+GAD_ASSUME_NONNULL_BEGIN
+
+/// Search ad border types.
+typedef NS_ENUM(NSUInteger, GADSearchBorderType) {
+  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,   ///< Light button color.
+  kGADSearchCallButtonMedium,  ///< Medium button color.
+  kGADSearchCallButtonDark     ///< Dark button color.
+};
+
+/// Specifies parameters for search ads.
+@interface GADSearchRequest : GADRequest
+
+/// 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;
+/// 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;
+/// 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.
+- (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.
+- (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 49 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoController.h

@@ -0,0 +1,49 @@
+//
+//  GADVideoController.h
+//  Google Mobile Ads SDK
+//
+//  Copyright (c) 2016 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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<GADVideoControllerDelegate> 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;
+
+/// Indicates if video click to expand behavior is enabled.
+- (BOOL)clickToExpandEnabled;
+@end
+
+GAD_ASSUME_NONNULL_END

+ 37 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoControllerDelegate.h

@@ -0,0 +1,37 @@
+//
+//  GADVideoControllerDelegate.h
+//  Google Mobile Ads SDK
+//
+//  Copyright (c) 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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<NSObject>
+
+@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

+ 27 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GADVideoOptions.h

@@ -0,0 +1,27 @@
+//
+//  GADVideoOptions.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2016 Google Inc. All rights reserved.
+//
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+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;
+
+/// Indicates whether the requested video should have the click to expand behavior.
+@property(nonatomic, assign) BOOL clickToExpandRequested;
+
+@end
+
+GAD_ASSUME_NONNULL_END

+ 105 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GoogleMobileAds.h

@@ -0,0 +1,105 @@
+//
+//  GoogleMobileAds.h
+//  Google Mobile Ads SDK
+//
+//  Copyright 2014 Google Inc. All rights reserved.
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
+#error The Google Mobile Ads SDK requires a deployment target of iOS 6.0 or later.
+#endif
+
+#if defined(__ARM_ARCH_7S__) && __ARM_ARCH_7S__
+#error The Google Mobile Ads SDK doesn't support linking with armv7s. Remove armv7s from "ARCHS" (Architectures) in your Build Settings.
+#endif
+
+/// Project version string for GoogleMobileAds.
+FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[];
+
+// Header files.
+#import <GoogleMobileAds/GoogleMobileAdsDefines.h>
+
+#import <GoogleMobileAds/GADAdNetworkExtras.h>
+#import <GoogleMobileAds/GADAdSize.h>
+#import <GoogleMobileAds/GADAudioVideoManagerDelegate.h>
+#import <GoogleMobileAds/GADAudioVideoManager.h>
+#import <GoogleMobileAds/GADBannerView.h>
+#import <GoogleMobileAds/GADBannerViewDelegate.h>
+#import <GoogleMobileAds/GADCorrelator.h>
+#import <GoogleMobileAds/GADCorrelatorAdLoaderOptions.h>
+#import <GoogleMobileAds/GADDebugOptionsViewController.h>
+#import <GoogleMobileAds/GADExtras.h>
+#import <GoogleMobileAds/GADInAppPurchase.h>
+#import <GoogleMobileAds/GADInAppPurchaseDelegate.h>
+#import <GoogleMobileAds/GADInterstitial.h>
+#import <GoogleMobileAds/GADInterstitialDelegate.h>
+#import <GoogleMobileAds/GADMediaView.h>
+#import <GoogleMobileAds/GADMobileAds.h>
+#import <GoogleMobileAds/GADNativeExpressAdView.h>
+#import <GoogleMobileAds/GADNativeExpressAdViewDelegate.h>
+#import <GoogleMobileAds/GADRequest.h>
+#import <GoogleMobileAds/GADRequestError.h>
+#import <GoogleMobileAds/GADVideoController.h>
+#import <GoogleMobileAds/GADVideoControllerDelegate.h>
+#import <GoogleMobileAds/GADVideoOptions.h>
+
+#import <GoogleMobileAds/DFPBannerView.h>
+#import <GoogleMobileAds/DFPBannerViewOptions.h>
+#import <GoogleMobileAds/DFPCustomRenderedAd.h>
+#import <GoogleMobileAds/DFPCustomRenderedBannerViewDelegate.h>
+#import <GoogleMobileAds/DFPCustomRenderedInterstitialDelegate.h>
+#import <GoogleMobileAds/DFPInterstitial.h>
+#import <GoogleMobileAds/DFPRequest.h>
+#import <GoogleMobileAds/GADAdSizeDelegate.h>
+#import <GoogleMobileAds/GADAppEventDelegate.h>
+
+#import <GoogleMobileAds/GADAdLoader.h>
+#import <GoogleMobileAds/GADAdLoaderAdTypes.h>
+#import <GoogleMobileAds/GADAdLoaderDelegate.h>
+
+#import <GoogleMobileAds/GADAdChoicesView.h>
+#import <GoogleMobileAds/GADNativeAd.h>
+#import <GoogleMobileAds/GADNativeAdDelegate.h>
+#import <GoogleMobileAds/GADNativeAdImage.h>
+#import <GoogleMobileAds/GADNativeAdImage+Mediation.h>
+#import <GoogleMobileAds/GADNativeAppInstallAd.h>
+#import <GoogleMobileAds/GADNativeAppInstallAdAssetIDs.h>
+#import <GoogleMobileAds/GADNativeContentAd.h>
+#import <GoogleMobileAds/GADNativeContentAdAssetIDs.h>
+#import <GoogleMobileAds/GADNativeCustomTemplateAd.h>
+
+#import <GoogleMobileAds/GADMultipleAdsAdLoaderOptions.h>
+#import <GoogleMobileAds/GADNativeAdImageAdLoaderOptions.h>
+#import <GoogleMobileAds/GADNativeAdViewAdOptions.h>
+
+#import <GoogleMobileAds/GADCustomEventBanner.h>
+#import <GoogleMobileAds/GADCustomEventBannerDelegate.h>
+#import <GoogleMobileAds/GADCustomEventExtras.h>
+#import <GoogleMobileAds/GADCustomEventInterstitial.h>
+#import <GoogleMobileAds/GADCustomEventInterstitialDelegate.h>
+#import <GoogleMobileAds/GADCustomEventNativeAd.h>
+#import <GoogleMobileAds/GADCustomEventNativeAdDelegate.h>
+#import <GoogleMobileAds/GADCustomEventParameters.h>
+#import <GoogleMobileAds/GADCustomEventRequest.h>
+
+#import <GoogleMobileAds/GADDynamicHeightSearchRequest.h>
+#import <GoogleMobileAds/GADSearchBannerView.h>
+#import <GoogleMobileAds/GADSearchRequest.h>
+
+#import <GoogleMobileAds/GADAdReward.h>
+#import <GoogleMobileAds/GADRewardBasedVideoAd.h>
+#import <GoogleMobileAds/GADRewardBasedVideoAdDelegate.h>
+
+#import <GoogleMobileAds/Mediation/GADMAdNetworkAdapterProtocol.h>
+#import <GoogleMobileAds/Mediation/GADMAdNetworkConnectorProtocol.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeAd.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeAdDelegate.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeAdNotificationSource.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeAppInstallAd.h>
+#import <GoogleMobileAds/Mediation/GADMediatedNativeContentAd.h>
+#import <GoogleMobileAds/Mediation/GADMediationAdRequest.h>
+#import <GoogleMobileAds/Mediation/GADMEnums.h>
+#import <GoogleMobileAds/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h>
+#import <GoogleMobileAds/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h>

+ 62 - 0
modules/admob/native/GoogleMobileAds-7.27.0/GoogleMobileAds/GoogleMobileAdsDefines.h

@@ -0,0 +1,62 @@
+//
+//  GoogleMobileAdsDefines.h
+//  Google Mobile Ads SDK
+//
+//  Copyright (c) 2015 Google Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#if defined(__cplusplus)
+#define GAD_EXTERN extern "C" __attribute__((visibility("default")))
+#else
+#define GAD_EXTERN extern __attribute__((visibility("default")))
+#endif  // defined(__cplusplus)
+
+#if defined(__has_feature) && defined(__has_attribute)
+#if __has_feature(attribute_deprecated_with_message)
+#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
+#elif __has_attribute(deprecated)
+#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated))
+#else
+#define GAD_DEPRECATED_MSG_ATTRIBUTE(s)
+#endif  // __has_feature(attribute_deprecated_with_message)
+#if __has_attribute(deprecated)
+#define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
+#else
+#define GAD_DEPRECATED_ATTRIBUTE
+#endif  // __has_attribute(deprecated)
+#else
+#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)
+
+#if defined(NS_STRING_ENUM)  // Available starting in Xcode 8.0.
+#define GAD_STRING_ENUM NS_STRING_ENUM
+#else
+#define GAD_STRING_ENUM
+#endif

+ 383 - 0
modules/admob/native/Monkey2AdView.java

@@ -0,0 +1,383 @@
+
+package com.monkey2.lib;
+
+import android.provider.Settings;
+import android.util.Log;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.google.android.gms.ads.AdListener;
+import com.google.android.gms.ads.AdRequest;
+import com.google.android.gms.ads.AdSize;
+import com.google.android.gms.ads.AdView;
+import com.google.android.gms.ads.InterstitialAd;
+import com.google.android.gms.ads.MobileAds;
+import com.google.android.gms.ads.reward.RewardItem;
+import com.google.android.gms.ads.reward.RewardedVideoAd;
+import com.google.android.gms.ads.reward.RewardedVideoAdListener;
+
+import org.libsdl.app.SDLActivity;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+public class Monkey2AdView{
+
+    private static final String TAG = "Monkey2AdView";
+
+    String _size;
+    String _layout;
+    String _adUnitId;
+    boolean _visible;
+    int _callback;
+
+    RewardedVideoAd _rewardedVideoAd;
+    InterstitialAd _interstitialAd;
+    AdView _adView;
+    int _adState;
+    int _error;
+    String _rewardType="";
+    int _rewardAmount;
+
+    public Monkey2AdView( final String size,final String layout,final String adUnitId,final boolean visible ){
+
+        _size=size;
+        _layout=layout;
+        _adUnitId=adUnitId;
+        _visible=visible;
+    }
+
+    void start( int callback ){
+
+        this._callback=callback;
+
+        Monkey2Activity.instance().runOnUiThread( new Runnable() {
+
+            public void run() {
+
+                if( _size.equals( "rewardedvideo" ) ){
+
+                    createRewardedVideoAd();
+
+                }else if( _size.equals( "interstitial" ) ){
+
+                    createInterstitialAd();
+
+                }else{
+
+                    createBannerAd();
+                }
+
+                requestAd();
+            }
+        } );
+    }
+
+    void setState( int state ){
+
+        if( state==_adState ) return;
+
+        _adState=state;
+
+        Monkey2Async.invokeAsyncCallback( _callback );
+    }
+
+    void createRewardedVideoAd(){
+
+        if( _adUnitId.equals( "" ) ) _adUnitId="ca-app-pub-3940256099942544/5224354917";
+
+        _rewardedVideoAd=MobileAds.getRewardedVideoAdInstance( Monkey2Activity.instance() );
+
+        _rewardedVideoAd.setRewardedVideoAdListener( new RewardedVideoAdListener(){
+
+            public void onRewardedVideoAdLoaded(){
+
+                Log.i( TAG,"onRewardedVideoAdLoaded" );
+
+                setState( 2 );
+            }
+
+            public void onRewardedVideoAdFailedToLoad( int _errorCode ){
+
+                Log.i( TAG,"onRewardedVideoAdFailedToLoad, _errorCode="+_errorCode );
+
+                _error=_errorCode;
+
+                setState( 3 );
+            }
+
+            public void onRewardedVideoAdOpened(){
+
+                Log.i( TAG,"onRewardedVideoAdOpened" );
+            }
+
+            public void onRewardedVideoStarted(){
+
+                Log.i( TAG,"onRewardedVideoStarted" );
+            }
+
+            public void onRewardedVideoAdLeftApplication(){
+
+                Log.i( TAG,"onRewardedVideoAdLeftApplication" );
+            }
+
+            public void onRewarded( RewardItem reward ){
+
+                Log.i( TAG,"onRewarded type='"+reward.getType()+"', amount="+reward.getAmount() );
+
+                _rewardType=reward.getType();
+
+                _rewardAmount=reward.getAmount();
+            }
+
+            public void onRewardedVideoAdClosed(){
+
+                Log.i( TAG, "onRewardedVideoAdClosed" );
+
+                setState( 0 );
+            }
+
+        } );
+    }
+
+    void createInterstitialAd(){
+
+        if( _adUnitId.equals( "" ) ) _adUnitId="ca-app-pub-3940256099942544/1033173712";
+
+        _interstitialAd=new InterstitialAd( Monkey2Activity.instance() );
+        _interstitialAd.setAdUnitId( _adUnitId );
+
+        _interstitialAd.setAdListener( new AdListener() {
+
+            public void onAdLoaded() {
+
+                Log.i( TAG,"onAdLoaded" );
+
+                setState( 2 );
+            }
+
+            public void onAdFailedToLoad( int _errorCode ){
+
+                Log.i( TAG,"onAdFailedToLoad, _errorCode="+_errorCode );
+
+                _error=_errorCode;
+
+                setState( 3 );
+            }
+
+            public void onAdClosed() {
+
+                Log.i( TAG,"onAdClosed" );
+
+                setState( 0 );
+            }
+        });
+    }
+
+    void createBannerAd(){
+
+        if(  _adUnitId.equals( "" ) ) _adUnitId="ca-app-pub-3940256099942544/6300978111";
+
+        AdSize adSize=AdSize.SMART_BANNER;
+
+        if( _size.equals( "banner" ) ){
+            adSize=AdSize.BANNER;
+        }else if( _size.equals( "large-banner" ) ) {
+            adSize=AdSize.LARGE_BANNER;
+        }else if( _size.equals( "medium-rectangle" ) ) {
+            adSize=AdSize.MEDIUM_RECTANGLE;
+        }else if( _size.equals( "full-banner" ) ){
+            adSize=AdSize.FULL_BANNER;
+        }else if( _size.equals( "leaderboard" ) ){
+            adSize=AdSize.LEADERBOARD;
+        }
+
+        RelativeLayout.LayoutParams params=
+                new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT );
+
+        if( _layout.equals( "top" ) ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_TOP );
+            params.addRule( RelativeLayout.CENTER_HORIZONTAL );
+        }else if( _layout.equals( "top-left" ) ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_TOP );
+            params.addRule( RelativeLayout.ALIGN_PARENT_LEFT );
+        }else if( _layout.equals( "top-right" ) ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_TOP );
+            params.addRule( RelativeLayout.ALIGN_PARENT_RIGHT );
+        }else if( _layout.equals( "left" ) ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_LEFT );
+            params.addRule( RelativeLayout.CENTER_VERTICAL );
+        }else if( _layout.equals( "right") ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_RIGHT );
+            params.addRule( RelativeLayout.CENTER_VERTICAL );
+        }else if( _layout.equals( "bottom" ) ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_BOTTOM );
+            params.addRule( RelativeLayout.CENTER_HORIZONTAL );
+        }else if( _layout.equals( "bottom-left") ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_BOTTOM );
+            params.addRule( RelativeLayout.ALIGN_PARENT_LEFT );
+        }else if( _layout.equals( "bottom-right") ){
+            params.addRule( RelativeLayout.ALIGN_PARENT_BOTTOM );
+            params.addRule( RelativeLayout.ALIGN_PARENT_RIGHT );
+        }else{
+            params.addRule( RelativeLayout.CENTER_VERTICAL );
+            params.addRule( RelativeLayout.CENTER_HORIZONTAL );
+        }
+
+        _adView=new AdView( Monkey2Activity.instance() );
+
+        _adView.setAdSize( adSize );
+
+        _adView.setAdUnitId( _adUnitId );
+
+        if( !_visible ) _adView.setVisibility( View.GONE );
+
+        _adView.setAdListener( new AdListener(){
+
+            public void onAdLoaded() {
+
+                Log.i( TAG,"onAdLoaded" );
+
+                _adView.bringToFront();
+
+                setState( 2 );
+            }
+
+            public void onAdFailedToLoad( int _errorCode ){
+
+                Log.i( TAG,"onAdFailedToLoad, _errorCode="+_errorCode );
+
+                _error=_errorCode;
+
+                setState( 3 );
+            }
+        });
+
+        Monkey2Activity.layout().addView( _adView,params );
+    }
+
+    //must be called on main thread...!
+    //
+    void requestAd(){
+
+        AdRequest.Builder builder=new AdRequest.Builder();
+
+        AdRequest adRequest=builder.build();
+
+        setState( 1 );
+
+        if( _rewardedVideoAd!=null ){
+
+            _rewardedVideoAd.loadAd( _adUnitId,adRequest );
+
+        }else if( _interstitialAd!=null ){
+
+            if( _interstitialAd.isLoaded() ){	//interstitials cant be 'reloaded'?
+
+                setState( 2 );
+
+            }else{
+
+                _interstitialAd.loadAd( adRequest );
+            }
+
+        }else if( _adView!=null ) {
+
+            _adView.loadAd( adRequest );
+
+        }
+    }
+
+    public void setVisible( boolean visible ){
+
+        if( visible ){
+
+            Monkey2Activity.instance().runOnUiThread( new Runnable(){
+
+                public void run() {
+
+                    if( _adState!=2 ) return;
+
+                    if( _rewardedVideoAd!=null ){
+
+                        _rewardedVideoAd.show();
+
+                    }else if( _interstitialAd!=null ){
+
+                        _interstitialAd.show();
+
+                    }else if( _adView!=null ){
+
+                        _adView.setVisibility( View.VISIBLE );
+
+                        _adView.bringToFront();
+                    }
+
+                }
+
+            } );
+
+        }else{
+
+            Monkey2Activity.instance().runOnUiThread( new Runnable(){
+
+                public void run() {
+
+                    if( _adState!=2 ) return;
+
+                    if( _adView!=null ){
+
+                        _adView.setVisibility( View.GONE );
+                    }
+                }
+
+            } );
+        }
+    }
+
+    public boolean getVisible(){
+
+        return (_adView!=null) ? _adView.getVisibility()==View.VISIBLE : false;
+    }
+
+    public int getState(){
+
+        return _adState;
+    }
+
+    public String getRewardType(){
+
+        return _rewardType;
+    }
+
+    public int getRewardAmount(){
+
+        return _rewardAmount;
+    }
+
+    public void consumeReward(){
+
+        _rewardType="";
+
+        _rewardAmount=0;
+    }
+
+    public int getError(){
+
+        return _error;
+    }
+
+    public void reload(){
+
+        _adState=0;
+
+        Monkey2Activity.instance().runOnUiThread( new Runnable(){
+
+            public void run() {
+
+                requestAd();
+            }
+        } );
+    }
+
+}

+ 93 - 0
modules/admob/native/adview_ios.h

@@ -0,0 +1,93 @@
+
+#include <bbmonkey.h>
+
+#include "../../std/async/native/async_cb.h"
+
+#ifdef __OBJC__
+
+#import "GoogleMobileAds/GADBannerView.h"
+#import "GoogleMobileAds/GADInterstitial.h"
+#import "GoogleMobileAds/GADRewardBasedVideoAd.h"
+#import "GoogleMobileAds/GADRewardBasedVideoAdDelegate.h"
+#import "GoogleMobileAds/GADAdReward.h"
+
+@interface BBAdmobDelegate : NSObject<GADBannerViewDelegate,GADInterstitialDelegate,GADRewardBasedVideoAdDelegate>
+
+@end
+
+#else
+
+#include <objc/objc.h>
+
+typedef struct objc_object BBAdmobDelegate;
+typedef struct objc_object GADRequest;
+typedef struct objc_object GADInterstitial;
+typedef struct objc_object GADBannerView;
+typedef struct objc_object GADRewardBasedVideoAd;
+
+#endif
+
+class BBAdView : public bbObject{
+
+	public:
+	
+	BBAdView(){}
+	
+	BBAdView( bbString size,bbString layout,bbString adUnitId,bbBool visible );
+	
+	void start( int callback );
+	
+	void setState( int state );
+	
+	void setVisible( bool visible );
+	
+	bool getVisible();
+	
+	int getState();
+	
+	bbString getRewardType();
+	
+	int getRewardAmount();
+	
+	void consumeReward();
+	
+	int getError();
+
+	void reload();
+
+	void createRewardBasedVideoAd();
+	
+	void createInterstitialAd();
+	
+	void createBannerAd();
+	
+//	private:
+
+	bbString _size;
+	
+	bbString _layout;
+	
+	bbString _adUnitId;
+	
+	bbBool _visible;
+	
+	int _callback=0;
+			
+	int _state=0;
+	
+	BBAdmobDelegate *_adDelegate=0;
+
+	GADRewardBasedVideoAd *_rewardBasedVideoAd=0;
+	
+	GADInterstitial *_interstitialAd=0;
+	
+	GADBannerView *_adView=0;
+
+	GADRequest *_adRequest=0;
+	
+	bbString _rewardType="";
+	
+	int _rewardAmount=0;
+	
+	int _error=0;
+};

+ 392 - 0
modules/admob/native/adview_ios.mm

@@ -0,0 +1,392 @@
+
+#import "adview_ios.h"
+#import <AdSupport/ASIdentifierManager.h>
+#import <CommonCrypto/CommonDigest.h>
+
+#import <SDL.h>
+
+//Ugly stuff, but need these 'coz admob interstitial/rewardedvideo don't suspend/resume app?
+//
+static void suspendApp(){
+
+	//send a 'fake' SDL_APP_WILLENTERBACKGROUND to app.
+	
+	SDL_Event event={0};
+	event.type=SDL_APP_WILLENTERBACKGROUND;
+	
+	if( SDL_PeepEvents( (SDL_Event*)&event,1,SDL_ADDEVENT,SDL_FIRSTEVENT,SDL_LASTEVENT )!=1 ){
+		printf( "SDL_PeepEvents error: %s\n",SDL_GetError() );fflush( stdout );
+	}
+}
+
+static void resumeApp(){
+
+	//send a 'fake' SDL_APP_DIDENTERFOREGROUND to app.
+	
+	SDL_Event event={0};
+	event.type=SDL_APP_DIDENTERFOREGROUND;
+	
+	if( SDL_PeepEvents( (SDL_Event*)&event,1,SDL_ADDEVENT,SDL_FIRSTEVENT,SDL_LASTEVENT )!=1 ){
+		printf( "SDL_PeepEvents error: %s\n",SDL_GetError() );fflush( stdout );
+	}
+}
+
+@implementation BBAdmobDelegate{
+
+	BBAdView *_view;
+}
+
+-(id)initWithView:(BBAdView*)view{
+
+	self=[super init];
+ 
+    if( self ){
+    	_view=view;
+    }
+ 
+    return self;
+}
+
+-(void)adViewDidReceiveAd:(GADBannerView*)bannerView{
+
+	printf( "Monkey2 AdViewDelegate: adViewDidReceiveAd\n" );fflush( stdout );
+	
+	_view->setState( 2 );	//Ready
+}
+
+-(void)adView:(GADBannerView*)bannerView didFailToReceiveAdWithError:(GADRequestError*)error{
+
+	NSString *err=error.localizedDescription;
+	
+	printf( "Monkey2 AdViewDelegate: bannerView didFailToReceiveAdWithError '%s' code=%ld\n",[err UTF8String],(long)error.code );fflush( stdout );
+	
+	_view->_error=error.code==9 ? 1 : -1;
+	
+	_view->setState( 3 );	//Error
+}
+
+-(void)interstitialDidReceiveAd:(GADInterstitial*)interstitial{
+
+	printf( "Monkey2 AdViewDelegate: interstitialDidReceivedAd\n" );fflush( stdout );
+
+	_view->setState( 2 );	//Ready
+}
+
+-(void)interstitial:(GADInterstitial*)ad didFailToReceiveAdWithError:(GADRequestError*)error{
+
+	NSString *err=error.localizedDescription;
+	
+	printf( "Monkey2 AdViewDelegate: interstitial didFailToReceiveAdWithError '%s' code=%ld\n",[err UTF8String],(long)error.code );fflush( stdout );
+	
+	_view->_error=error.code==9 ? 1 : -1;
+
+	_view->setState( 3 );	//Error
+}
+
+-(void)interstitialWillPresentScreen:(GADInterstitial*)interstitial{
+
+	printf( "Monkey2 AdViewDelegate: interstitialWillPresentScreen\n" );fflush( stdout );
+	
+	suspendApp();
+}
+
+-(void)interstitialDidDismissScreen:(GADInterstitial*)interstitial{
+
+	printf( "Monkey2 AdViewDelegate: interstitialDidDismissScreen\n" );fflush( stdout );
+	
+	_view->setState( 0 );	//Initial
+	
+	resumeApp();
+}
+
+-(void)rewardBasedVideoAd:(GADRewardBasedVideoAd*)rewardBasedVideoAd didRewardUserWithReward:(GADAdReward*)reward{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAd didRewardUserWithReward, type='%s', amount=%l\n",[reward.type UTF8String],[reward.amount doubleValue] );fflush( stdout );
+	
+	_view->_rewardType=bbString( reward.type );	//careful! threading...
+	
+	_view->_rewardAmount=(int)[reward.amount doubleValue];
+}
+
+-(void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd*)rewardBasedVideoAd{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAdDidReceiveAd\n" );fflush( stdout );
+
+	_view->setState( 2 );	//Ready
+}
+
+-(void)rewardBasedVideoAd:(GADRewardBasedVideoAd*)rewardBasedVideoAd didFailToLoadWithError:(NSError*)error{
+
+	NSString *err=error.localizedDescription;
+	
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAd didFailToLoadWithError '%s' code=%ld\n",[err UTF8String],(long)error.code );fflush( stdout );
+	
+	_view->_error=error.code==9 ? 1 : -1;
+
+	_view->setState( 3 );	//Error
+}
+
+-(void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd*)rewardBasedVideoAd{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAdDidOpen\n" );fflush( stdout );
+
+//	_view->setState( 4 );	//Playing
+	
+	suspendApp();
+}
+
+-(void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd*)rewardBasedVideoAd{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAdDidClose\n" );fflush( stdout );
+	
+	_view->setState( 0 );	//Initial
+
+	resumeApp();
+}
+
+-(void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd*)rewardBasedVideoAd{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAdDidStartPlaying\n" );fflush( stdout );
+}
+
+-(void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd*)rewardBasedVideoAd{
+
+	printf( "Monkey2 AdViewDelegate: rewardBasedVideoAdWillLeaveApplication\n" );fflush( stdout );
+}
+
+@end
+
+static NSString *admobDeviceID(){
+
+    NSUUID* adid = [[ASIdentifierManager sharedManager] advertisingIdentifier];
+    const char *cStr = [adid.UUIDString UTF8String];
+    unsigned char digest[16];
+    CC_MD5( cStr, strlen(cStr), digest );
+
+    NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
+
+    for(int i = 0; i < CC_MD5_DIGEST_LENGTH; i++)
+        [output appendFormat:@"%02x", digest[i]];
+
+    return output;
+}
+
+BBAdView::BBAdView( bbString size,bbString layout,bbString adUnitId,bbBool visible ):_size( size ),_layout( layout ),_adUnitId( adUnitId ),_visible( visible ){
+}
+
+void BBAdView::start( int callback ){
+
+	_callback=callback;
+
+	_adDelegate=[[BBAdmobDelegate alloc] initWithView:this];
+		
+	_adRequest=[GADRequest request];
+	
+	if( _size=="rewardedvideo" ){
+		
+        if( _adUnitId=="" ) _adUnitId="ca-app-pub-3940256099942544/1712485313";
+        
+		createRewardBasedVideoAd();
+	
+	}else if( _size=="interstitial" ){
+		
+        if( _adUnitId=="" ) _adUnitId="ca-app-pub-3940256099942544/1033173712";
+        
+		createInterstitialAd();
+	
+	}else{
+		
+        if( _adUnitId=="" ) _adUnitId="ca-app-pub-3940256099942544/6300978111";
+
+		createBannerAd();
+	}
+}
+
+void BBAdView::setState( int state ){
+
+	if( state==_state ) return;
+	
+	_state=state;
+	
+	bbAsync::invokeAsyncCallback( _callback );
+}
+
+void BBAdView::createRewardBasedVideoAd(){
+
+	_rewardBasedVideoAd=[GADRewardBasedVideoAd sharedInstance];
+	
+	_rewardBasedVideoAd.delegate=_adDelegate;
+	
+	[_rewardBasedVideoAd loadRequest:[GADRequest request] withAdUnitID:[NSString stringWithUTF8String:_adUnitId.c_str()]];
+	
+	setState( 1 );
+}
+
+void BBAdView::createInterstitialAd(){
+	
+	_interstitialAd=[[GADInterstitial alloc] initWithAdUnitID:[NSString stringWithUTF8String:_adUnitId.c_str()]];
+		
+	_interstitialAd.delegate=_adDelegate;
+		
+	[_interstitialAd loadRequest:[GADRequest request]];
+		
+	setState( 1 );
+}
+
+void BBAdView::createBannerAd(){
+	
+	UIWindow *keyWindow=[UIApplication sharedApplication].keyWindow;
+	if( !keyWindow ) return;
+		
+	UIViewController *rootViewController=keyWindow.rootViewController;
+	if( !rootViewController ) return;
+	
+	GADAdSize adSize=kGADAdSizeBanner;
+    if( _size=="banner" ){
+        adSize=kGADAdSizeBanner;
+    }else if( _size=="large-banner" ){
+        adSize=kGADAdSizeLargeBanner;
+    }else if( _size=="medium-rectangle" ){
+        adSize=kGADAdSizeMediumRectangle;
+    }else if( _size=="full-banner" ){
+        adSize=kGADAdSizeFullBanner;
+    }else if( _size=="leaderboard" ){
+        adSize=kGADAdSizeLeaderboard;
+    }
+		
+	_adView=[[GADBannerView alloc] initWithAdSize:adSize];
+	_adView.delegate=_adDelegate;
+	_adView.adUnitID=[NSString stringWithUTF8String:_adUnitId.c_str()];
+	_adView.rootViewController=rootViewController;
+	_adView.hidden=_visible ? NO : YES;
+		
+	CGRect b1=keyWindow.bounds;
+	CGRect b2=_adView.frame;
+	
+	if( _layout=="top-left" ){		
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin;
+	}else if( _layout=="top" ){
+		b2.origin.x=(b1.size.width-b2.size.width)/2;
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin;
+	}else if( _layout=="top-right" ){
+		b2.origin.x=(b1.size.width-b2.size.width);
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleBottomMargin;
+	}else if( _layout=="bottom-left" ){
+		b2.origin.y=(b1.size.height-b2.size.height);
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin;
+	}else if( _layout=="bottom" ){
+		b2.origin.x=(b1.size.width-b2.size.width)/2;
+		b2.origin.y=(b1.size.height-b2.size.height);
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin;
+	}else if( _layout=="bottom-right" ){
+		b2.origin.x=(b1.size.width-b2.size.width);
+		b2.origin.y=(b1.size.height-b2.size.height);
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleTopMargin;
+	}else{
+		b2.origin.x=(b1.size.width-b2.size.width)/2;
+		b2.origin.y=(b1.size.height-b2.size.height)/2;
+		_adView.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;
+	}		
+	
+	_adView.frame=b2;
+		
+	[_adView.rootViewController.view addSubview:_adView];
+	
+	[_adView loadRequest:_adRequest];
+		
+	setState( 1 );
+}
+	
+void BBAdView::setVisible( bool visible ){
+
+	if( _adView ){
+		_adView.hidden=!visible;
+		return;
+	}
+	
+	if( !visible ) return;
+
+	if( _state!=2 ){
+		printf( "Monkey2 AdView setVisible error, expecting _state==2, but _state==%i\n",_state );fflush( stdout );
+		return;
+	}
+
+	if( _rewardBasedVideoAd ){
+		
+		if( _rewardBasedVideoAd.isReady ){
+			
+			UIWindow *keyWindow=[UIApplication sharedApplication].keyWindow;
+			if( !keyWindow ) return;
+			
+			UIViewController *rootViewController=keyWindow.rootViewController;
+			if( !rootViewController ) return;
+			
+			[_rewardBasedVideoAd presentFromRootViewController:rootViewController];
+				
+		}
+			
+	}else if( _interstitialAd ){
+		
+		if( _interstitialAd.isReady ){
+		
+			UIWindow *keyWindow=[UIApplication sharedApplication].keyWindow;
+			if( !keyWindow ) return;
+			
+			UIViewController *rootViewController=keyWindow.rootViewController;
+			if( !rootViewController ) return;
+			
+			[_interstitialAd presentFromRootViewController:rootViewController];
+		}
+	}
+}
+
+bool BBAdView::getVisible(){
+
+	return _adView && _adView.hidden==NO;
+}
+
+int BBAdView::getState(){
+
+	return _state;
+}
+
+int BBAdView::getError(){
+
+	return _error;
+}
+
+bbString BBAdView::getRewardType(){
+
+	return _rewardType;
+}
+
+int BBAdView::getRewardAmount(){
+
+	return _rewardAmount;
+}
+
+void BBAdView::consumeReward(){
+
+	_rewardType="";
+	
+	_rewardAmount=0;
+}
+
+void BBAdView::reload(){
+
+	_state=0;
+
+	if( _size=="rewardedvideo" ){
+		
+		createRewardBasedVideoAd();
+	
+	}else if( _size=="interstitial" ){
+		
+		createInterstitialAd();
+	
+	}else{
+		
+		createBannerAd();
+	}
+}
+