Files
flipper/docs/getting-started/react-native.mdx
Jirka Svoboda 9ab8c236b5 Added --repo-update to pod install in readme (#3208)
Summary:
Took me a while during updating Flipper version to resolve proper iOs install with --repo-update (I am newbie to react native). I think others could benefit from having this in readme directly.

## Changelog

Just Readme.md change. No functional change at all.

Pull Request resolved: https://github.com/facebook/flipper/pull/3208

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

**Static Docs Preview: flipper**
|[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/D33307795/V2/flipper/)|

|**Modified Pages**|
|[docs/getting-started/react-native](https://our.intern.facebook.com/intern/staticdocs/eph/D33307795/V2/flipper/docs/getting-started/react-native/)|

Reviewed By: antonk52

Differential Revision: D33307795

Pulled By: mweststrate

fbshipit-source-id: 0fd202593c6aa37c80fde4a44a7b3472b8672370
2021-12-24 04:46:49 -08:00

50 lines
2.0 KiB
Plaintext

---
id: react-native
title: Set up your React Native App
sidebar_label: Automatic Setup
---
import useBaseUrl from '@docusaurus/useBaseUrl';
import Link from '@docusaurus/Link';
Starting with React Native 0.62, after generating your project with `react-native init`, the Flipper integration is ready out of the box for debug builds:
* For Android, start the Flipper Desktop application, and start your project using `yarn android`. Your application will appear in Flipper.
* For iOS, run `pod install` once in the `ios` directory of your project. After that, run `yarn ios` and start Flipper. Your application will show up in Flipper.
By default, the following plugins will be available:
* Layout Inspector
* Network
* Databases
* Images
* Shared Preferences
* Crash Reporter
* React DevTools
* Metro Logs
Additional plugins can be installed through the plugin manager.
To create your own plugins and integrate with Flipper using JavaScript, check out our <Link to={useBaseUrl("/docs/tutorial/react-native")}>writing plugins for React Native</Link> tutorial!
### Using the latest Flipper SDK
By default React Native might ship with an outdated Flipper SDK. To make sure you are using the latest version, determine the latest released version of Flipper by running `npm info flipper`.
Android:
1. Bump the `FLIPPER_VERSION` variable in `android/gradle.properties`, for example: `FLIPPER_VERSION=0.127.0`.
2. Run `./gradlew clean` in the `android` directory.
iOS:
1. Call `use_flipper` with a specific version in `ios/Podfile`, for example: `use_flipper!({ 'Flipper' => '0.127.0' })`.
2. Run `pod install --repo-update` in the `ios` directory.
## Manual Setup
If you are not using a default React Native template or cannot use the upgrade tool,
you can find instructions for how to integate Flipper into your projects in these guides:
- <a href={useBaseUrl("/docs/getting-started/react-native-android")}>React Native for Android</a>
- <a href={useBaseUrl("/docs/getting-started/react-native-ios")}>React Native for iOS</a>