diff --git a/docs/embedded-app-ios.html b/docs/embedded-app-ios.html index 5858191ba1e..26404b96ffa 100644 --- a/docs/embedded-app-ios.html +++ b/docs/embedded-app-ios.html @@ -1,4 +1,4 @@ -
Since React makes no assumptions about the rest of your technology stack – it’s commonly noted as simply the V in MVC – it’s easily embeddable within an existing non-React Native app. In fact, it integrates with other best practice community tools like CocoaPods.
gem install cocoapodsbrew install iojs && brew link iojs --force or from nvmbrew unlink node if you have previously installed NodeCocoaPods is a package management tool for iOS/Mac development. We need to use it to download React Native. If you haven't installed CocoaPods yet, check out this tutorial.
When you are ready to work with CocoaPods, add the following line to Podfile. If you don't have one, then create it under the root directory of your project.
Since React makes no assumptions about the rest of your technology stack – it’s commonly noted as simply the V in MVC – it’s easily embeddable within an existing non-React Native app. In fact, it integrates with other best practice community tools like CocoaPods.
gem install cocoapodsnvm install iojs && nvm alias default iojs, which installs the latest version of io.js and sets up your terminal so that typing node runs io.js. With nvm you can install multiple versions of Node and io.js and easily switch between them.brew install iojs && brew link iojs --force. You may need to run brew unlink node if you have previously installed Node.CocoaPods is a package management tool for iOS/Mac development. We need to use it to download React Native. If you haven't installed CocoaPods yet, check out this tutorial.
When you are ready to work with CocoaPods, add the following line to Podfile. If you don't have one, then create it under the root directory of your project.
Remember to install all subspecs you need. The <Text> element cannot be used without pod 'React/RCTText'.
Then install your pods:
There are two pieces you’ll need to set up:
RCTRootView to display and manage your React Native componentsFirst, create a directory for your app’s React code and create a simple index.ios.js file:
Copy & paste following starter code for index.ios.js – it’s a barebones React Native app:
brew install iojs && brew link iojs --force. You may need to run brew unlink node if you have previously installed Node. New to io.js or npm?brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow. If you want to use flow.npm install -g react-native-clireact-native init AwesomeProjectIn the newly created folder AwesomeProject/
AwesomeProject.xcodeproj and hit run in Xcode.index.ios.js in your text editor of choice and edit some lines.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.
nvm install iojs && nvm alias default iojs, which installs the latest version of io.js and sets up your terminal so that typing node runs io.js. With nvm you can install multiple versions of Node and io.js and easily switch between them.brew install iojs && brew link iojs --force. You may need to run brew unlink node if you have previously installed Node.brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow. If you want to use flow.We recommend periodically running brew update && brew upgrade to keep your programs up-to-date.
npm install -g react-native-clireact-native init AwesomeProjectIn the newly created folder AwesomeProject/
AwesomeProject.xcodeproj and hit run in Xcode.index.ios.js in your text editor of choice and edit some lines.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.