Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Add missing Custom Native delegate, property to Native Add and rename Native Ad delegate. #650

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 36 additions & 7 deletions source/Google/MobileAds/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,10 @@ interface NativeAd {
[Export ("advertiser")]
string Advertiser { get; }

[NullAllowed]
[Export("headline")]
string Headline { get; }

// @property(nonatomic, readonly, nonnull) GADMediaContent *mediaContent;
[Export ("mediaContent")]
MediaContent MediaContent { get; }
Expand Down Expand Up @@ -987,22 +991,47 @@ interface NativeAd {
void RecordCustomClickGesture ();
}

interface IUnifiedNativeAdLoaderDelegate { }

interface ICustomNativeAdLoaderDelegate
{
}

#if NET
[Model]
#else
[Model (AutoGeneratedName = true)]
#endif
[Protocol]
[BaseType(typeof(NSObject), Name = "GADCustomNativeAdLoaderDelegate")]
interface CustomNativeAdLoaderDelegate : IAdLoaderDelegate
{
// @required -(NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader;
[Abstract]
[Export("customNativeAdFormatIDsForAdLoader:")]
string[] CustomNativeAdFormatIDsForAdLoader(AdLoader adLoader);

// @required -(void)adLoader:(GADAdLoader *)adLoader didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd;
[Abstract]
[Export("adLoader:didReceiveCustomNativeAd:")]
void DidReceiveNativeCustomTemplateAd(AdLoader adLoader, CustomNativeAd nativeCustomTemplateAd);
}

interface INativeAdLoaderDelegate { }

// CHECK
// @protocol GADUnifiedNativeAdLoaderDelegate <GADAdLoaderDelegate>
// @protocol GADNativeAdLoaderDelegate <GADAdLoaderDelegate>
#if NET
[Model]
#else
[Model (AutoGeneratedName = true)]
#endif
[Protocol]
[BaseType (typeof (NSObject), Name = "GADUnifiedNativeAdLoaderDelegate")]
interface UnifiedNativeAdLoaderDelegate : AdLoaderDelegate {
// @required -(void)adLoader:(GADAdLoader * _Nonnull)adLoader didReceiveUnifiedNativeAd:(GADNativeAd * _Nonnull)nativeAd;
[BaseType (typeof (NSObject), Name = "GADNativeAdLoaderDelegate")]
interface NativeAdLoaderDelegate : AdLoaderDelegate {
// @required -(void)adLoader:(GADAdLoader * _Nonnull)adLoader didReceiveNativeAd:(GADNativeAd * _Nonnull)nativeAd;
[Abstract]
[Export ("adLoader:didReceiveUnifiedNativeAd:")]
void DidReceiveUnifiedNativeAd (AdLoader adLoader, NativeAd nativeAd);
[Export ("adLoader:didReceiveNativeAd:")]
void DidReceiveNativeAd (AdLoader adLoader, NativeAd nativeAd);
}

// @interface GADNativeAdView : UIView
Expand Down