From ffc7b48baaf5f9cefee5b57335598a35d3c8844c Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 11 May 2015 23:41:39 +0000 Subject: [PATCH] update website --- docs/embedded-app.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/embedded-app.html b/docs/embedded-app.html index 69582ca3ada..ee0c8686871 100644 --- a/docs/embedded-app.html +++ b/docs/embedded-app.html @@ -34,7 +34,7 @@ React.AppRegistryViewController () @property (weak, nonatomic) IBOutlet ReactView *reactView; -@end

Here I disabled AutoLayout for simplicity. In real production world, you should turn on AutoLayout and setup constraints by yourself.

Add RCTRootView To Container View #

Ready for the most interesting part? Now we shall create the RCTRootView, where your React Native app lives in.

In ReactView.m, we need to first initiate RCTRootView with the URI of your index.ios.bundle. index.ios.bundle will be created by packager and served by React Native server, which will be discussed later on.

NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; +@end

Here I disabled AutoLayout for simplicity. In real production world, you should turn on AutoLayout and setup constraints by yourself.

Add RCTRootView To Container View #

Ready for the most interesting part? Now we shall create the RCTRootView, where your React Native app lives.

In ReactView.m, we need to first initiate RCTRootView with the URI of your index.ios.bundle. index.ios.bundle will be created by packager and served by React Native server, which will be discussed later on.

NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; // For production use, this `NSURL` could instead point to a pre-bundled file on disk: // // NSURL *jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];