-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Version 2 #165
Merged
RFC: Version 2 #165
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
please note, these changes are not backwards compatible. The exported view properties now match the properties of the DFPBannerView. I've now implemented the `validAdSizes` property, and replaced the `testDeviceID` property with `testDevices`. Also the simulator device id can be specified using `PublisherBanner.simulatorId` instead of `"EMULATOR"`. The conversion of json to GADAdSize is now implemented using a RCTConvert category. And lastly, 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.
this omits the need of explicit conversion
also, there are no nativeOnly events so removed those
instead of the mixed names like RNAdMobManager and BannerView they're all named like the implemented class, e.g. RNGADBannerView and RNGADBannerViewManager.
replaced deprecated RCTEventDispatcher with RCTEventEmitter
replaced deprecated RCTEventDispatcher with RCTEventEmitter
this is more or less the bare minimum, we should probably add some rules along the way
This was referenced Sep 28, 2017
This was referenced Sep 28, 2017
add adFailedToOpen and videoStarted events
react-native-admob currently not work, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General
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.DFPBannerView
/GADBannerView
(the iOS library classes).validAdSizes
property for DFP bannerstestDeviceID
property withtestDevices
. Also the simulator device id can be specified usingPublisherBanner.simulatorId
/AdMobBanner.simulatorId
instead of"EMULATOR"
.onAdmobDispatchAppEvent
.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
GADAdSize
is now implemented using aRCTConvert
category.onSizeChange
handler is now also called through theGADAdSizeDelegate
in addition to comparing the bounds of the view to the adsize.RCTEventDispatcher
withRCTEventEmitter
Android
...
Prerelease
Alpha releases of version 2 are available on npm, which can be installed using;
Yarn
npm
The alpha is safe to use in production (I use it in production in 2 apps with both over 10k users without issues), although you can expect breaking changes in between alpha releases.
TODO
NB. This builds on my other PR (#149), where I've updated React Native in the example. So just have a look at the commits after the update one:
736ac7a...next