Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 10 additions & 8 deletions source/Google/MobileAds/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,11 @@ interface ResponseInfo
// typedef void (^GADRewardedAdLoadCompletionHandler)(GADRewardedAd *_Nullable rewardedAd, NSError *_Nullable error);
delegate void RewardedAdLoadCompletionHandler ([NullAllowed] RewardedAd rewardedAd, [NullAllowed] NSError error);

// typedef void (^GADUserDidEarnRewardHandler)(void)
delegate void UserDidEarnRewardHandler ();

// @interface GADRewardedAd : NSObject <GADAdMetadataProvider, GADFullScreenPresentingAd>
[BaseType (typeof (FullScreenContentDelegate), Name = "GADRewardedAd")]
[BaseType (typeof (FullScreenPresentingAd), Name = "GADRewardedAd")]
interface RewardedAd : AdMetadataProvider {
// + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID request:(nullable GADRequest *)request completionHandler:(nonnull GADRewardedAdLoadCompletionHandler)completionHandler;
[Async]
Expand All @@ -527,10 +530,9 @@ interface RewardedAd : AdMetadataProvider {
[Export ("responseInfo")]
ResponseInfo ResponseInfo { get; }

// @property (readonly, nonatomic) GADAdReward * _Nullable reward;
[NullAllowed]
[Export ("reward")]
AdReward Reward { get; }
// @property (readonly, nonatomic, nonnull) GADAdReward *adReward;
[Export ("adReward")]
AdReward AdReward { get; }

// @property (nonatomic, nullable) GADServerSideVerificationOptions *serverSideVerificationOptions;
[NullAllowed]
Expand All @@ -546,9 +548,9 @@ interface RewardedAd : AdMetadataProvider {
[Export ("canPresentFromRootViewController:error:")]
bool CanPresent (UIViewController rootViewController, [NullAllowed] out NSError error);

// -(void)presentFromRootViewController:(UIViewController * _Nonnull)viewController delegate:(id<GADRewardedAdDelegate> _Nonnull)delegate;
[Export ("presentFromRootViewController:delegate:")]
void Present (UIViewController viewController, IRewardedAdDelegate @delegate);
// -(void)presentFromRootViewController:(nonnull UIViewController *)rootViewController userDidEarnRewardHandler:(nonnull GADUserDidEarnRewardHandler)userDidEarnRewardHandler;
[Export ("presentFromRootViewController:userDidEarnRewardHandler:")]
void Present (UIViewController viewController, UserDidEarnRewardHandler userDidEarnRewardHandler);

[Export ("adMetadata")]
NSDictionary<NSString, NSObject> AdMetadata { get; }
Expand Down
6 changes: 3 additions & 3 deletions source/Google/MobileAds/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public partial class AdSizeCons
{
//GAD_EXTERN GADAdSize GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth (CGFloat width);
[DllImport ("__Internal", EntryPoint = "GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth")]
public static extern AdSize GetPortraitAnchoredAdaptiveBannerAdSize (CGSize size);
public static extern AdSize GetPortraitAnchoredAdaptiveBannerAdSize (nfloat width);

//GAD_EXTERN GADAdSize GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth (CGFloat width);
[DllImport ("__Internal", EntryPoint = "GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth")]
public static extern AdSize GetLandscapeAnchoredAdaptiveBannerAdSize (CGSize size);
public static extern AdSize GetLandscapeAnchoredAdaptiveBannerAdSize (nfloat width);

//GAD_EXTERN GADAdSize GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth (CGFloat width);
[DllImport ("__Internal", EntryPoint = "GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth")]
public static extern AdSize GetCurrentOrientationAnchoredAdaptiveBannerAdSize (CGSize size);
public static extern AdSize GetCurrentOrientationAnchoredAdaptiveBannerAdSize (nfloat width);

// GADAdSize GADAdSizeFromCGSize(CGSize size);
[DllImport ("__Internal", EntryPoint = "GADAdSizeFromCGSize")]
Expand Down