diff --git a/docs/sidebar.yaml b/docs/sidebar.yaml index bdb4c9ab..4259e2d3 100644 --- a/docs/sidebar.yaml +++ b/docs/sidebar.yaml @@ -257,7 +257,3 @@ to: '/' - text: Quick Start to: '/quick-start' - - text: Android Setup - to: '/android' - - text: iOS Setup - to: '/ios' diff --git a/docs/utils/android.md b/docs/utils/android.md deleted file mode 100644 index 5b580dad..00000000 --- a/docs/utils/android.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Android Setup -description: Manually integrate Utils into your Android application. ---- - -# Android Manual Linking - -> The following steps are only required if your environment does not have access to React Native -> auto-linking. - -## TODO diff --git a/docs/utils/index.md b/docs/utils/index.md index 6d5f207a..a3195d15 100644 --- a/docs/utils/index.md +++ b/docs/utils/index.md @@ -17,7 +17,7 @@ development of the React Native Firebase library. title="Quick Start" to="/quick-start" > - Install & integrate the utils functionality into your app or tests. + Start using the utilities in your own application. - The API reference covers everything required to successfully monitor your apps performance. + The API reference covers everything required to use the utils within your own application. diff --git a/docs/utils/ios.md b/docs/utils/ios.md deleted file mode 100644 index 3adb02e5..00000000 --- a/docs/utils/ios.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: iOS Setup -description: Manually integrate Utils into your iOS application. ---- - -# iOS Manual Linking - -> The following steps are only required if your environment does not have access to React Native -> auto-linking. - -## TODO diff --git a/docs/utils/quick-start.md b/docs/utils/quick-start.md index 475874cf..2311b27e 100644 --- a/docs/utils/quick-start.md +++ b/docs/utils/quick-start.md @@ -5,28 +5,14 @@ description: Getting started with the Utils package in React Native Firebase # Utils Quick Start -## Installation - -Install this module with Yarn: - -```bash -yarn add @react-native-firebase/utils -``` - -> Integrating manually and not via React Native auto-linking? Check the setup instructions for Android & iOS. +The utils module comes installed with the `app` module. ## Module usage -Import the Performance Monitoring package into your project: +Import the Utils package into your project: ```js -import utils from '@react-native-firebase/utils'; -``` - -The package also provides access to the firebase instance: - -```js -import { firebase } from '@react-native-firebase/utils'; +import { utils } from '@react-native-firebase/app'; ``` ### Detect whether the app is running within TestL Lab @@ -40,7 +26,7 @@ It is useful to change the apps configuration if it is being run in Test Lab, fo data collection. Such functionality can be carried out by taking advantage of the `isRunningInTestLab` property: ```js -import utils from '@react-native-firebase/utils'; +import { utils } from '@react-native-firebase/app'; import analytics from '@react-native-firebase/analytics'; async function bootstrap() { @@ -49,3 +35,15 @@ async function bootstrap() { } } ``` + +### Access device file paths + +Some modules require access to your local device filesystem (such as Storage & ML Kit Vision). The utils +module access to the device directory locations, working cross platform on Android & iOS. + +```js +import { utils } from '@react-native-firebase/app'; + +// Access the device pictures directory +const picturesDir = utils.FilePath.PICTURES_DIRECTORY; +```