From 41b0160b60a1fe67ca6d48f8c73e006af9056732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Fossli?= Date: Fri, 1 Apr 2016 07:12:15 -0700 Subject: [PATCH] Sample code closer to tutorial Summary:I found several inconcistencies with the repo and the tutorial. - No app transport security policy was set in `Info.plist` - `Pods` folder was ignored / missing - `node_modules` was ignored / missing - In the tutorial the folder was named `ReactComponents`, but in source it was `ReactComponents` - link to tutorial from readme doesn't work I think the repo should have all these problems fixed. I found it simpler to start from scratch and figure what's wrong that way than adjusting https://github.com/tjwudi/EmbededReactNativeExample Closes https://github.com/facebook/react-native/pull/5285 Differential Revision: D3126361 Pulled By: mkonicek fb-gh-sync-id: f8a4365c4b4497c3aeb6f8cf929bb65d0b7f5708 fbshipit-source-id: f8a4365c4b4497c3aeb6f8cf929bb65d0b7f5708 --- docs/EmbeddedAppIOS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/EmbeddedAppIOS.md b/docs/EmbeddedAppIOS.md index 5bb036022..f13abc851 100644 --- a/docs/EmbeddedAppIOS.md +++ b/docs/EmbeddedAppIOS.md @@ -186,7 +186,7 @@ In root directory, we need to start React Native development server. (JS_DIR=`pwd`/ReactComponent; cd node_modules/react-native; npm run start -- --root $JS_DIR) ``` -This command will start up a React Native development server within our CocoaPods dependency to build our bundled script. The `--root` option indicates the root of your React Native apps – this will be our `ReactComponents` directory containing the single `index.ios.js` file. This running server will package up the `index.ios.bundle` file accessible via `http://localhost:8081/index.ios.bundle`. +This command will start up a React Native development server within our CocoaPods dependency to build our bundled script. The `--root` option indicates the root of your React Native apps – this will be our `ReactComponent` directory containing the single `index.ios.js` file. This running server will package up the `index.ios.bundle` file accessible via `http://localhost:8081/index.ios.bundle`. ## Update App Transport Security @@ -222,4 +222,4 @@ Live reload and all of the debugging tools will work from the simulator (make su So under the hood, when `RCTRootView` is initialized, it will try to download, parse and run the bundle file from React Native development server. This means all you need to do is to implement your own container view or view controller for the `RCTRootView` – the `RCTRootView` ingests your bundled JS and renders your React components. Bravo! -You can checkout full source code of a sample application [here](https://github.com/tjwudi/EmbededReactNativeExample). +You can checkout full source code of a sample application [here](https://github.com/hfossli/ReactNativeIntegration).