[skip ci] docs - fiam stub

This commit is contained in:
ehesp
2019-04-29 09:50:54 +01:00
parent b99a1ea0e0
commit 51ab2af6dc
4 changed files with 122 additions and 0 deletions

11
docs/fiam/android.md Normal file
View File

@@ -0,0 +1,11 @@
---
title: Android Setup
description: Manually integrate Firebase In-App Messaging into your Android application.
---
# Android Setup
> The following steps are only required if your environment does not have access to React Native
auto-linking.
## TODO

43
docs/fiam/index.md Normal file
View File

@@ -0,0 +1,43 @@
---
title: Firebase In-App Messaging (FIAM)
description: Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages.
---
# Firebase In-App Messaging
Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual
messages that encourage them to use key app features. React Native Firebase provides support for both native Android
& iOS integration with a simple JavaScript API.
<Youtube id="5MRKpvKV2pg" />
## Getting Started
<Grid>
<Block
icon="build"
color="#ffc107"
title="Quick Start"
to="/quick-start"
>
Install & delivering In-App messages to your users.
</Block>
<Block
icon="layers"
color="#03A9F4"
title="Reference"
to="/reference"
>
The Cloud Firestore reference API mimics that of the Firebase Web SDK. Our reference documentation covers
every aspect of the module.
</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-fiam)
- [Github Issues](https://github.com/invertase/react-native-firebase/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Afiam+)
- [Firebase Documentation](https://firebase.google.com/docs/in-app-messaging?utm_source=invertase&utm_medium=react-native-firebase&utm_campaign=fiam)

11
docs/fiam/ios.md Normal file
View File

@@ -0,0 +1,11 @@
---
title: iOS Setup
description: Manually integrateFirebase In-App Messaging into your iOS application.
---
# iOS Setup
> The following steps are only required if your environment does not have access to React Native
auto-linking.
## TODO

57
docs/fiam/quick-start.md Normal file
View File

@@ -0,0 +1,57 @@
---
title: Firebase In-App Messaging Quick Start
description: Get to grips with the basics of Firebase In-App Messaging in React Native Firebase
---
# Firebase In-App Messaging Quick Start
## Installation
Install this module with Yarn:
```bash
yarn add @react-native-firebase/fiam
```
> 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
Once installed, any published campaigns from the [Firebase console](https://console.firebase.google.com/?utm_source=invertase&utm_medium=fiam&utm_campaign=quick_start)
are automatically handled and displayed on your users device. The module provides a JavaScript API to allow greater
control of the displaying of these messages.
Once installed, import the FIAM package into your project:
```js
import fiam from '@react-native-firebase/fiam';
```
The package also provides access to the firebase instance:
```js
import { firebase } from '@react-native-firebase/fiam';
```
### Suppressing messages
The Firebase console campaign manager provides a few events to handle when messages are displayed to users. In some
situations you may want to handle this manually to only display messages at a chosen time, for example once a user
has completed an on-boarding process within your app. The `setMessagesDisplaySuppressed` method can be used to
achieve this.
> The suppressed state is not persisted between restarts, so ensure it is called as early as possible.
```js
import fiam from '@react-native-firebase/fiam';
async function bootstrap() {
await fiam().setMessagesDisplaySuppressed(true);
}
async function onSetup(user) {
await setupUser(user);
// Allow user to receive messages now setup is complete
fiam().setMessagesDisplaySuppressed(false);
}
```