v2.0.0-beta.1
Pre-release
Pre-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 withtestDevices
. Also the simulator device id can now be specified using thesimulatorId
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()
andshowAd()
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 aRCTConvert
category. - The
onSizeChange
handler is now also called through theGADAdSizeDelegate
in addition to comparing the bounds of the view to the adsize. - Replaced remaining use of deprecated
RCTEventDispatcher
withRCTEventEmitter
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