You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using React Native AdMob with cocoapods, you have to add `Google-Mobile-Ads-SDK` to your `Podfile` manually, because that framework contains a binary framework, which isn't supported when used with `use_frameworks!`.
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ You can use npm or Yarn to install the latest beta version:
20
20
21
21
In order to use this library, you have to link it to your project first. There's excellent documentation on how to do this in the [React Native Docs](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#content).
22
22
23
+
Alternatively for iOS you can install the library with CocoaPods by adding a line to your `Podfile`;
24
+
25
+
pod 'react-native-admob', path: '../node_modules/react-native-admob'
26
+
23
27
### iOS
24
28
25
29
For iOS you will have to add the [Google Mobile Ads SDK](https://developers.google.com/admob/ios/quick-start#import_the_mobile_ads_sdk) to your Xcode project.
@@ -75,7 +79,7 @@ For a full example reference to the [example project](Example).
75
79
76
80
##### `adSize`
77
81
78
-
*Corresponding to [iOS framework banner size constants](https://developers.google.com/admob/ios/banner)*
82
+
_Corresponding to [iOS framework banner size constants](https://developers.google.com/admob/ios/banner)_
79
83
80
84
<table>
81
85
<thead>
@@ -84,7 +88,7 @@ For a full example reference to the [example project](Example).
84
88
<th>Description</th>
85
89
<th>Availability</th>
86
90
<th>Size (WxH)</th>
87
-
</t>
91
+
</tr>
88
92
</thead>
89
93
<tbody>
90
94
<tr>
@@ -129,7 +133,7 @@ For a full example reference to the [example project](Example).
129
133
</tbody>
130
134
</table>
131
135
132
-
*Note: There is no `smartBannerPortrait` and `smartBannerLandscape` on Android. Both prop values will map to `smartBanner`*
136
+
_Note: There is no `smartBannerPortrait` and `smartBannerLandscape` on Android. Both prop values will map to `smartBanner`_
133
137
134
138
##### `onAdLoaded`
135
139
@@ -155,8 +159,7 @@ Accepts a function. Called when a user click will open another app (such as the
155
159
156
160
Accepts a function. Called when the size of the banner changes. The function is called with an object containing the width and the height.
157
161
158
-
159
-
*Above names correspond to the [Ad lifecycle event callbacks](https://developers.google.com/admob/android/banner#ad_events)*
162
+
_Above names correspond to the [Ad lifecycle event callbacks](https://developers.google.com/admob/android/banner#ad_events)_
160
163
161
164
### PublisherBanner
162
165
@@ -190,7 +193,7 @@ Sets the AdUnit ID for all future ad requests.
190
193
191
194
Sets the devices which are served test ads.
192
195
193
-
*For simulators/emulators you can use `AdMobInterstitial.simulatorId` for the test device ID.*
196
+
_For simulators/emulators you can use `AdMobInterstitial.simulatorId` for the test device ID._
194
197
195
198
##### `requestAd()`
196
199
@@ -204,7 +207,6 @@ Shows an interstitial and returns a promise, which resolves when an ad is going
204
207
205
208
Calls callback with a boolean value whether the interstitial is ready to be shown.
206
209
207
-
208
210
#### Events
209
211
210
212
Unfortunately, events are not consistent across iOS and Android. To have one unified API, new event names are introduced for pairs that are roughly equivalent.
@@ -265,7 +267,7 @@ Sets the AdUnit ID for all future ad requests.
265
267
266
268
Sets the devices which are served test ads.
267
269
268
-
*For simulators/emulators you can use `AdMobRewarded.simulatorId` for the test device ID.*
270
+
_For simulators/emulators you can use `AdMobRewarded.simulatorId` for the test device ID._
269
271
270
272
##### `requestAd()`
271
273
@@ -289,7 +291,7 @@ Unfortunately, events are not consistent across iOS and Android. To have one uni
0 commit comments