From 20ae7adac4b1419f9fbfe42623a42d722f2bd3d4 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 30 Mar 2015 20:13:04 +0000 Subject: [PATCH] update website --- docs/getting-started.html | 2 +- docs/troubleshooting.html | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/troubleshooting.html diff --git a/docs/getting-started.html b/docs/getting-started.html index 3f3f470a46d..5d9b8e47810 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -1,4 +1,4 @@ -React Native | A framework for building native apps using React

Getting Started

Requirements #

  1. OS X - This repo only contains the iOS implementation right now, and Xcode only runs on Mac.
  2. New to Xcode? Download it from the Mac App Store.
  3. Homebrew is the recommended way to install node, watchman, and flow.
  4. brew install node. New to node or npm?
  5. brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.
  6. brew install flow. If you want to use flow.

Quick start #

  • npm install -g react-native-cli
  • react-native init AwesomeProject

In the newly created folder AwesomeProject/

  • Open AwesomeProject.xcodeproj and hit run in Xcode
  • Open index.ios.js in your text editor of choice and edit some lines
  • Hit cmd+R (twice) in your iOS simulator to reload the app and see your change!

Congratulations! You've just successfully run and modified your first React Native app.

© 2015 Facebook Inc.

Getting Started

Requirements #

  1. OS X - This repo only contains the iOS implementation right now, and Xcode only runs on Mac.
  2. New to Xcode? Download it from the Mac App Store.
  3. Homebrew is the recommended way to install node, watchman, and flow.
  4. brew install node. New to node or npm?
  5. brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.
  6. brew install flow. If you want to use flow.

Quick start #

  • npm install -g react-native-cli
  • react-native init AwesomeProject

In the newly created folder AwesomeProject/

  • Open AwesomeProject.xcodeproj and hit run in Xcode
  • Open index.ios.js in your text editor of choice and edit some lines
  • Hit cmd+R (twice) in your iOS simulator to reload the app and see your change!

Congratulations! You've just successfully run and modified your first React Native app.

If you run into any issues getting started, see the troubleshooting page.

© 2015 Facebook Inc.

Troubleshooting

Cmd-R does not reload the simulator #

Enable iOS simulator's "Connect hardware keyboard" from menu Hardware > Keyboard menu.

Keyboard Menu

If you are using a non-QWERTY/AZERTY keyboard layout you can use the Hardware > Shake Gesture to bring up the dev menu and click "Refresh"

Port already in use red-screen #

red-screen

Something is probably already running on port 8081. You can either kill it or try to change which port the packager is listening to.

Kill process on port 8081 #

$ sudo lsof -n -i4TCP:8081 | grep LISTEN

then

$ kill -9 <cma process id>

Change the port in Xcode #

Edit AppDelegate.m to use a different port.

// OPTION 1 + // Load from development server. Start the server from the repository root: + // + // $ npm start + // + // To run on device, change `localhost` to the IP address of your computer, and make sure your computer and + // iOS device are on the same Wi-Fi network. + jsCodeLocation = [NSURL URLWithString:@"http://localhost:9381/index.ios.bundle"];
© 2015 Facebook Inc.
\ No newline at end of file