-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md for Example app (#3731)
- Loading branch information
Showing
1 changed file
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,69 @@ | ||
## Running the example | ||
## Running the Example app | ||
|
||
- clone the repository | ||
- `yarn install` at main directory | ||
- `cd Example/` | ||
- `yarn install` again | ||
1. Clone the repository: | ||
|
||
``` | ||
git clone https://github.com/software-mansion/react-native-reanimated | ||
cd react-native-reanimated | ||
``` | ||
|
||
2. Install node_modules in project root directory: | ||
|
||
``` | ||
yarn | ||
``` | ||
|
||
3. Install node_modules in `Example/` directory: | ||
|
||
``` | ||
cd Example | ||
yarn | ||
``` | ||
|
||
4. Install Pods in `Example/ios/` directory: | ||
|
||
``` | ||
cd ios | ||
pod install | ||
``` | ||
|
||
5. Start Metro bundler in `Example/` directory | ||
|
||
``` | ||
cd .. | ||
yarn start | ||
``` | ||
|
||
### Running on iOS | ||
|
||
- `yarn pod-install` - to install pods | ||
- `yarn react-native run-ios` - to run the app | ||
You can either open the workspace in Xcode and launch the app from there: | ||
|
||
``` | ||
open ios/ReanimatedExample.xcworkspace | ||
``` | ||
|
||
or build and run directly from the command line: | ||
|
||
``` | ||
yarn react-native run-ios | ||
``` | ||
|
||
**Important:** You will need to have an iOS device or simulator connected. | ||
|
||
### Running on Android | ||
|
||
- [install NDK in version 21.3.6528147 or higher](https://developer.android.com/studio/projects/install-ndk) | ||
- `yarn react-native run-android` - to run the app | ||
You can either open the project with Android Studio and launch the app from there: | ||
|
||
``` | ||
open -a "Android Studio" android/ | ||
``` | ||
|
||
or build and run directly from the command line: | ||
|
||
``` | ||
yarn react-native run-android | ||
``` | ||
|
||
**Note:** Android compiles fairly long due to native dependencies. To shorten consecutive builds, load the project into android studio and run it from there. Same applies to iOS so you can use XCode for running the example. | ||
**Note:** You can also pass `--active-arch-only` flag to build the app only for the current architecture to significantly shorten build time. | ||
|
||
**Important:** You will need to have an Android or iOS device or emulator connected. | ||
**Important:** You will need to have an Android device or emulator connected. |