Skip to content

Commit

Permalink
Merge branch 'master' into @ehesp/ts-review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehesp authored Sep 24, 2019
2 parents 579ac7d + 0606b37 commit c2d0982
Show file tree
Hide file tree
Showing 184 changed files with 2,655 additions and 2,682 deletions.
415 changes: 1 addition & 414 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
<p align="center">
<a href="https://invertase.link/discord"><img src="https://img.shields.io/discord/295953187817521152.svg?style=flat-square&colorA=7289da&label=Chat%20on%20Discord" alt="Chat on Discord"></a>
<a href="https://twitter.com/rnfirebase"><img src="https://img.shields.io/twitter/follow/rnfirebase.svg?style=flat-square&colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter"></a>
<a href="https://www.facebook.com/groups/rnfirebase"><img src="https://img.shields.io/badge/Follow%20on%20Facebook-4172B8?logo=facebook&style=flat-square&logoColor=fff" alt="Follow on Facebook"></a>
</p>

---

> **WARNING**: Master branch is the work in progress v6.0.0 version of React Native Firebase, you're probably looking for the current [v5.x.x branch](https://github.com/invertase/react-native-firebase/tree/v5.x.x) instead, please send all PRs for the live version to that branch. You can [learn more about this here](https://invertase.io/blog/react-native-firebase-2019).
> Looking for the legacy version of React Native Firebase? See the [v5.x.x branch](https://github.com/invertase/react-native-firebase/tree/v5.x.x).
---

Expand Down
4 changes: 2 additions & 2 deletions docs/admob/android-installation.md → docs/admob/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Import and apply the React Native Firebase module package to your `/android/app/
Import the package:

```java
import io.invertase.firebase.analytics.ReactNativeFirebaseAdMobPackage;
import io.invertase.firebase.admob.ReactNativeFirebaseAdMobPackage;
```

Add the package to the registry:
Expand All @@ -51,6 +51,6 @@ protected List<ReactPackage> getPackages() {
Once the above steps have been completed, rebuild your Android project:

```bash
react-native run-android
npx react-native run-android
```

9 changes: 9 additions & 0 deletions docs/admob/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@ and [Rewarded Video Ads](https://developers.google.com/admob/android/rewarded-vi
The reference API for AdMob covers all aspects of the package, from component props to advert lifecycle events.
</Block>
</Grid>

## Learn more

Our documentation is a great place to start, however if you're looking for more help or want to help others,
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-admob)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20Admob)
- [Firebase Documentation](https://firebase.google.com/docs/admob?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=admob)
15 changes: 3 additions & 12 deletions docs/admob/ios-installation.md → docs/admob/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ description: Manually integrate AdMob into your iOS application.

# iOS Manual Installation

The following steps are only required if you are using React Native <= 0.59 or need to manually integrate the library.
> The following steps are only required if you are using React Native <= 0.59 or need to manually integrate the library.
Installation can be done via CocoaPods (recommended) or via Frameworks:

## 1. CocoaPods Installation
## CocoaPods Installation

### Add the RNFBAdMob Pod

Expand All @@ -34,12 +32,5 @@ $ pod install --repo-update
Once the Pods have installed locally, rebuild your iOS project:

```bash
react-native run-ios
npx react-native run-ios
```

## 2. Manual Framework Installation

If your environment does not have access to Cocopods, it is still possible to install the project
via Frameworks.

TODO
18 changes: 11 additions & 7 deletions docs/admob/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ description: Getting started with AdMob in React Native Firebase

## Installation

This module depends on the `@react-native-firebase/app` module. To get started and install `app`,
visit the project's <Anchor version={false} group={false} href="/quick-start">quick start</Anchor> guide.

Install this module with Yarn:

```bash
yarn add @react-native-firebase/admob
```

Need to install the module manually? Follow the <Anchor href="/android-installation">Android</Anchor> or <Anchor href="/ios-installation">iOS</Anchor> manual installation guides.
**IMPORTANT**: Ensure you update the "Contains ads" settings in the Google Play Store (via Pricing & Distribution tab).

> IMPORTANT: Ensure you update the "Contains ads" settings in the Google Play Store (via Pricing & Distribution tab).
> Integrating manually and not via React Native auto-linking? Check the setup instructions for <Anchor version group href="/android">Android</Anchor> & <Anchor version group href="/ios">iOS</Anchor>.
## Module usage

The AdMob package provides a JavaScript API for integrating event based adverts such as Interstitial Ads and
React component view adverts such as Banner Ads. It also provides functionality for requesting consent from those users within the EEA, specified by EU ePrivacy Directive & GDPR.

Import the Cloud Functions package into your project:
Import the AdMob package into your project:

```js
import admob from '@react-native-firebase/admob';
Expand All @@ -47,7 +50,8 @@ Add the ID to your root level `firebase.json` file under the `react-native` obje
```json
{
"react-native": {
"admob_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
"admob_android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"admob_ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
```
Expand Down Expand Up @@ -89,7 +93,7 @@ The AdMob module supports 3 advert types:

Out of the box, AdMob does not handle any related regulations which you may need to enforce on your application. It is up to the developer to implement and handle this on a user-by-user basis. For example, you must consent to EEA users being served both personalized and non-personalized adverts before showing them. For more information, see [Requesting Consent from European Users](https://developers.google.com/admob/android/eu-consent).

The AdMob module provides a `AdConsent` helper to help developers quickly implement consent flows within their application. See the <Anchor version group href="/european-user-consent">European User Consent</Anchor> page for full examples of
The AdMob module provides a `AdConsent` helper to help developers quickly implement consent flows within their application. See the <Anchor version group href="/european-user-consent">European User Consent</Anchor> page for full examples of
how to integrate the helper into your application.

#### Testing
Expand All @@ -111,7 +115,7 @@ interstitialAd.onAdEvent((type, error) => {
interstitialAd.load();
```

Once our interstitial has been loaded from the Google AdMob servers, we will start to receieve events within our handler (e.g. ad loaded). These events also include user based events such as notifying us when the user has closed the ad, or clicked the ad and left the application. For a full list of events, see the `AdEventType` class.
Once our interstitial has been loaded from the Google AdMob servers, we will start to receive events within our handler (e.g. ad loaded). These events also include user based events such as notifying us when the user has closed the ad, or clicked the ad and left the application. For a full list of events, see the `AdEventType` class.

Once the advert has been loaded, we can show it to the user. Listen out for the loaded event, and once ready, show it to the user:

Expand Down Expand Up @@ -169,6 +173,6 @@ import { InterstitialAd, TestIds } from '@react-native-firebase/admob';
// Create a new instance
const interstitialAd = InterstitialAd.createForAdRequest(TestIds.INTERSTITIAL, {
requestNonPersonalizedAdsOnly: true,
keywords: ['fashion', 'clothing']
keywords: ['fashion', 'clothing'],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ protected List<ReactPackage> getPackages() {
Once the above steps have been completed, rebuild your Android project:

```bash
react-native run-android
npx react-native run-android
```

6 changes: 3 additions & 3 deletions docs/analytics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ device information, location, user actions and more.
title="Reserved Events"
to="/reserved-events"
>
Firebase Analytics automatically tracks certain events which cannot be overridden. Understanding
Firebase Analytics automatically tracks certain events which cannot be overridden. Understanding
what events are provided out of the box is a great place to start.
</Block>
<Block
Expand All @@ -38,7 +38,7 @@ device information, location, user actions and more.
version={false}
to="/guides?tags=analytics"
>
Analytics works great out of the box, however provides a powerful API to gain full analytical insight into
Analytics works great out of the box, however provides a powerful API to gain full analytical insight into
your application. Our guides cover topics from the basics to advanced integration techiques.
</Block>
<Block
Expand All @@ -57,5 +57,5 @@ Our documentation is a great place to start, however if you're looking for more
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-analytics)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Aanalytics+)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20Analytics)
- [Firebase Documentation](https://firebase.google.com/docs/analytics?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=analytics)
11 changes: 2 additions & 9 deletions docs/analytics/ios-installation.md → docs/analytics/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following steps are only required if you are using React Native <= 0.59 or n

Installation can be done via CocoaPods (recommended) or via Frameworks:

## 1. CocoaPods Installation
## CocoaPods Installation

### Add the RNFBAnalytics Pod

Expand All @@ -34,16 +34,9 @@ $ pod install --repo-update
Once the Pods have installed locally, rebuild your iOS project:

```bash
react-native run-ios
npx react-native run-ios
```

## 2. Manual Framework Installation

If your environment does not have access to Cocopods, it is still possible to install the project
via Frameworks.

TODO

## Device Identification

If you would like to enable Firebase Analytics to generate automatic audience metrics for iOS (as it does by default in Android), you must link additional iOS libraries, [as documented by the Google Firebase team](https://support.google.com/firebase/answer/6318039). Specifically you need `libAdIdAccess.a` and `AdSupport.framework`.
Expand Down
5 changes: 4 additions & 1 deletion docs/analytics/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ description: Getting started with Analytics in React Native Firebase

## Installation

This module depends on the `@react-native-firebase/app` module. To get started and install `app`,
visit the project's <Anchor version={false} group={false} href="/quick-start">quick start</Anchor> guide.

Install this module with Yarn:

```bash
yarn add @react-native-firebase/analytics
```

Need to install the module manually? Follow the <Anchor href="/android-installation">Android</Anchor> or <Anchor href="/ios-installation">iOS</Anchor> manual installation guides.
> Integrating manually and not via React Native auto-linking? Check the setup instructions for <Anchor version group href="/android">Android</Anchor> & <Anchor version group href="/ios">iOS</Anchor>.
## Module usage

Expand Down
6 changes: 3 additions & 3 deletions docs/app/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ app to be installed.

## Getting Started

<Grid>
<Grid columns="3">
<Block
icon="build"
color="#ffc107"
Expand Down Expand Up @@ -47,5 +47,5 @@ Our documentation is a great place to start, however if you're looking for more
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-app)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Aapp+)
- [Firebase Documentation](https://firebase.google.com/docs/functions?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=app)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20App%2FCore)
- [Firebase Documentation](https://firebase.google.com/docs/?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=app)
2 changes: 2 additions & 0 deletions docs/app/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Install this module with Yarn:
yarn add @react-native-firebase/app
```

> Integrating manually and not via React Native auto-linking? Check the setup instructions for <Anchor version group href="/android">Android</Anchor> & <Anchor version group href="/ios">iOS</Anchor>.
### Initializing Firebase

React Native Firebase provides two methods for initializing your with Firebase.
Expand Down
4 changes: 2 additions & 2 deletions docs/auth/android-installation.md → docs/auth/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Import and apply the React Native Firebase module package to your `/android/app/
Import the package:

```java
import io.invertase.firebase.analytics.ReactNativeFirebaseAuthPackage;
import io.invertase.firebase.auth.ReactNativeFirebaseAuthPackage;
```

Add the package to the registry:
Expand All @@ -51,6 +51,6 @@ protected List<ReactPackage> getPackages() {
Once the above steps have been completed, rebuild your Android project:

```bash
react-native run-android
npx react-native run-android
```

4 changes: 2 additions & 2 deletions docs/auth/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Authenticate users with your application. React Native Firebase int
# Authentication

The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications.
React Native Firebase provides access to all Firebase authentication methods and idenity providers.
React Native Firebase provides access to all Firebase authentication methods and identity providers.

<Youtube id="8sGY55yxicA" />

Expand Down Expand Up @@ -46,5 +46,5 @@ Our documentation is a great place to start, however if you're looking for more
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-auth)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Aauth+)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20Authentication)
- [Firebase Documentation](https://firebase.google.com/docs/auth?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=auth)
10 changes: 2 additions & 8 deletions docs/auth/ios-installation.md → docs/auth/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following steps are only required if you are using React Native <= 0.59 or n

Installation can be done via CocoaPods (recommended) or via Frameworks:

## 1. CocoaPods Installation
## CocoaPods Installation

### Add the RNFBAuth Pod

Expand All @@ -34,12 +34,6 @@ $ pod install --repo-update
Once the Pods have installed locally, rebuild your iOS project:

```bash
react-native run-ios
npx react-native run-ios
```

## 2. Manual Framework Installation

If your environment does not have access to Cocopods, it is still possible to install the project
via Frameworks.

TODO
7 changes: 5 additions & 2 deletions docs/auth/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ description: Getting started with Authentication in React Native Firebase

## Installation

This module depends on the `@react-native-firebase/app` module. To get started and install `app`,
visit the project's <Anchor version={false} group={false} href="/quick-start">quick start</Anchor> guide.

Install this module with Yarn:

```bash
yarn add @react-native-firebase/auth
```

Need to install the module manually? Follow the <Anchor href="/android-installation">Android</Anchor> or <Anchor href="/ios-installation">iOS</Anchor> manual installation guides.
> Integrating manually and not via React Native auto-linking? Check the setup instructions for <Anchor version group href="/android">Android</Anchor> & <Anchor version group href="/ios">iOS</Anchor>.
## Module usage

Expand Down Expand Up @@ -103,7 +106,7 @@ including Facebook, Google, Twitter and Github, along with phone/SMS authenticat
title="Phone Auth"
to="/phone-auth"
>
Phone authentication allows users to sign in to Firebase using their phone as the authenticator.
Phone authentication allows users to sign in to Firebase using their phone as the authenticator.
</Block>
</Grid>

Expand Down
4 changes: 2 additions & 2 deletions docs/crashlytics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ Our documentation is a great place to start, however if you're looking for more
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-crashlytics)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Acrashlytics+)
- [Firebase Documentation](https://firebase.google.com/docs/functions?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=crashlytics)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20Crashlytics)
- [Firebase Documentation](https://firebase.google.com/docs/crashlytics?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=crashlytics)
3 changes: 3 additions & 0 deletions docs/crashlytics/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ description: Getting started with Crashlytics in React Native Firebase

## Installation

This module depends on the `@react-native-firebase/app` module. To get started and install `app`,
visit the project's <Anchor version={false} group={false} href="/quick-start">quick start</Anchor> guide.

Install this module with Yarn:

```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/database/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ Our documentation is a great place to start, however if you're looking for more
check out the resources below:

- [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native-firebase-database)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Adatabase+)
- [Firebase Documentation](https://firebase.google.com/docs/functions?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=database)
- [Github Issues](https://github.com/invertase/react-native-firebase/labels/Service%3A%20Database)
- [Firebase Documentation](https://firebase.google.com/docs/database?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=database)
26 changes: 19 additions & 7 deletions docs/database/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@ description: Manually integrate Realtime Database into your iOS application.
> The following steps are only required if your environment does not have access to React Native
> auto-linking.
#### Add Realtime Database Pod
## CocoaPods Installation

**`ios/Podfile`**:
### Add the RNFBAnalytics Pod

```ruby{4}
// ..
Add the `RNFBDatabase` Pod to your projects `/ios/Podfile`:

```ruby{3}
target 'app' do
// ..
...
pod 'RNFBDatabase', :path => '../node_modules/@react-native-firebase/database/ios'
end
```

## Manual iOS Integration via Frameworks
### Update Pods & rebuild the project

You may need to update your local Pods in order for the `RNFBDatabase` Pod to be installed in your project:

```bash
$ cd /ios/
$ pod install --repo-update
```

Once the Pods have installed locally, rebuild your iOS project:

_TODO_
```bash
npx react-native run-ios
```
3 changes: 3 additions & 0 deletions docs/database/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ description: Getting started with Realtime Database in React Native Firebase

## Installation

This module depends on the `@react-native-firebase/app` module. To get started and install `app`,
visit the project's <Anchor version={false} group={false} href="/quick-start">quick start</Anchor> guide.

Install this module with Yarn:

```bash
Expand Down
Loading

0 comments on commit c2d0982

Please sign in to comment.