Skip to content

v2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@koenpunt koenpunt released this 03 Oct 21:08
· 50 commits to master since this release

Changelog

All the changes mentioned here can be found in this PR: #165

  • The banner views are now instantiated by React instead of vending an instance from the manager.
  • The loadBanner method is now exposed to react, to allow easy banner refresh, and removes the need of checking which properties are available before making a request to admob.
  • The exported view properties now match the properties of the DFPBannerView/GADBannerView (the iOS library classes).
  • Implemented the validAdSizes property for DFP banners
  • replaced the testDeviceID property with testDevices. Also the simulator device id can now be specified using the simulatorId property on any of the classes (e.g. AdMobBanner.simulatorId) instead of "EMULATOR".
  • Fixed the implementation of ad app events.
  • Exposed the onSizeChange prop.
  • Updated the implementation of requestAd() and showAd() to return a promise instead of using a callback function.
  • All function props and events have been normalized.
1.3 2.0
bannerSize adSize
onAdViewDidReceiveAd onAdLoaded
onDidFailToReceiveAdWithError onAdFailedToLoad
onAdViewWillPresentScreen onAdOpened
onAdViewWillDismissScreen onAdClosed
onAdViewWillLeaveApplication onAdLeftApplication
onDidReceiveAppEvent onAppEvent
interstitialDidLoad
rewardedVideoDidLoad
adLoaded
interstitialDidFailToLoad
rewardedVideoDidFailToLoad
adFailedToLoad
interstitialDidOpen
rewardedVideoDidOpen
adOpened
interstitialDidClose
rewardedVideoDidClose
adClosed
interstitialWillLeaveApplication
rewardedVideoWillLeaveApplication
adLeftApplication
rewardedVideoDidRewardUser rewarded

iOS Specific

  • The conversion of json to GADAdSize is now implemented using a RCTConvert category.
  • The onSizeChange handler is now also called through the GADAdSizeDelegate in addition to comparing the bounds of the view to the adsize.
  • Replaced remaining use of deprecated RCTEventDispatcher with RCTEventEmitter

Android

  • Added messages to the errors instead of just having error codes

Installation

This version can be installed using the next tag of the package:

Yarn

yarn add react-native-admob@next

npm

npm install --save react-native-admob@next