Skip to content

Commit

Permalink
release v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jun 27, 2023
1 parent 9b58d22 commit daa4147
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 266 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ docs/
# Example
example/


android/build
28 changes: 14 additions & 14 deletions docs/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@ title: Installation
sidebar_label: Installation
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

<Tabs>
<TabItem value="npm" label="npm" default>
<pre> npm install react-native-admob-native-ads --save </pre>
<pre> npm install react-native-admob-native-ads --save </pre>
</TabItem>
<TabItem value="yarn" label="yarn">
<pre> yarn add react-native-admob-native-ads </pre>
<pre> yarn add react-native-admob-native-ads </pre>
</TabItem>
</Tabs>

Install `react-native-vector-icons` to use `StarRatingView`.
Install `react-native-vector-icons` to use `StarRatingView`.

<Tabs>
<TabItem value="npm" label="npm" default>
<pre>npm install react-native-vector-icons --save</pre>
<pre>npm install react-native-vector-icons --save</pre>
</TabItem>
<TabItem value="yarn" label="yarn">
<pre>yarn add react-native-vector-icons</pre>
<pre>yarn add react-native-vector-icons</pre>
</TabItem>
</Tabs>

Expand Down Expand Up @@ -72,9 +71,9 @@ Follow the guide to add [Google Mobile Ads SDK](https://developers.google.com/ad
1. In your `Podfile`:

```
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleMobileAdsMediationFacebook'
pod 'Google-Mobile-Ads-SDK', '~>9.11.0'
```

2. Update your `info.plist` file as mentioned in [Admob Documentation](https://developers.google.com/admob/ios/quick-start#update_your_infoplist)

After configuring your project run:
Expand All @@ -88,23 +87,25 @@ pod install --repo-update
On iOS 14 onwards, you need to request IDFA access through App Tracking Transparency Dialog to show targeted ads to the user. For that you can use [react-native-tracking-transparency](https://github.com/mrousavy/react-native-tracking-transparency).

## Generate your Native Ad Ids

Before you can show any ads, you will need to generate Admob Ids on your Admob account. For debugging you can use test ad ids provided by google given below:

### Android

| Type | ID |
|-----------------------|----------------------------------------|
| --------------------- | -------------------------------------- |
| Native Advanced | ca-app-pub-3940256099942544/2247696110 |
| Native Advanced Video | ca-app-pub-3940256099942544/1044960115 |

### iOS

| Type | ID |
|-----------------------|----------------------------------------|
| --------------------- | -------------------------------------- |
| Native Advanced | ca-app-pub-3940256099942544/3986624511 |
| Native Advanced Video | ca-app-pub-3940256099942544/2521693316 |

## Enable Test Device

A test device can be registered on App launch with `AdManager`:

```jsx
Expand All @@ -114,12 +115,11 @@ AdManager.setRequestConfiguration({
testDeviceIds:["Your test device id"];
});
```

To get your device test ids, follow the guide for [iOS](https://developers.google.com/admob/ios/test-ads#enable_test_devices) & [Android](https://developers.google.com/admob/ios/test-ads#enable_test_devices).

:::caution

When you newly generate your ad ids from Admob account and implement them in the app. It can take a few hours to a day for ads to show up. So be patient or use the test ids above for testing.

:::


1 change: 0 additions & 1 deletion example/.ruby-version

This file was deleted.

5 changes: 2 additions & 3 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby File.read(File.join(__dir__, '.ruby-version')).strip
ruby '>= 2.6.10'

gem 'cocoapods', '~> 1.11', '>= 1.11.3'
gem 'cocoapods', '>= 1.11.3'
8 changes: 8 additions & 0 deletions example/ios/File.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// File.swift
// example
//
// Created by Ammar Ahmed on 27/06/2023.
//

import Foundation
4 changes: 2 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ target 'example' do
# :app_path => "#{Pod::Config.instance.installation_root}/.."
)

pod 'Google-Mobile-Ads-SDK', '~>9.11.0'
pod 'GoogleMobileAdsMediationFacebook'
pod 'Google-Mobile-Ads-SDK'
pod 'react-native-admob-native-ads', :path => '../../react-native-admob-native-ads.podspec'

target 'exampleTests' do
inherit! :complete
Expand Down
Loading

0 comments on commit daa4147

Please sign in to comment.