Recently I tried to add react-native-admob to my app. I got an error while working on ios. Invariant Violation: requireNativeComponent: "RNGADBannerView" was not found in the UIManager.
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-admob": "^2.0.0-beta.5",
I added this to podfile. pod 'Google-Mobile-Ads-SDK' And then, install pod again. cd ios pod install
I also added GADApplicationIdentifier to info.
import {
AdMobBanner,
} from 'react-native-admob'
class BannerAds extends Component {
render() {
return (
<AdMobBanner
style={styles.bottomBanner}
adSize="banner"
adUnitID="my app id"
onAdFailedToLoad={error => console.error(error)}
/>
// <View>
// </View>
)
}
}