Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guide for using React Native in existing iOS App #546

Merged
merged 5 commits into from Mar 31, 2015

Conversation

@tjwudi
Copy link
Contributor

tjwudi commented Mar 31, 2015

See #483. I wrote a tutorial on this topic and would like to add it as a guide.


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.

pod 'React'

This comment has been minimized.

Copy link
@vjeux

vjeux Mar 31, 2015

Contributor

use ``` instead of indentation to format code

This comment has been minimized.

Copy link
@tjwudi

tjwudi Mar 31, 2015

Author Contributor

Now fixed in b873fd6

Use ``` instead of indentation for code blocks

You should now add container view for React Native component. It can be any **UIView** in your app.

![Container view example](http://7qn8cx.com1.z0.glb.clouddn.com/c37deb761ce048225989ece06cf3d185061c511d-74d3e6b285e1b5cd93153c39fca63c63838b8dbf.png?imageView2/2/h/400/w/400/q/85)

This comment has been minimized.

Copy link
@vjeux

vjeux Mar 31, 2015

Contributor

Can you add this image in the repo (website/src/react-native/img) this way it won't 404 if this url goes down.

This comment has been minimized.

Copy link
@tjwudi

tjwudi Mar 31, 2015

Author Contributor

Of course. Just a sec ;)


Now compile and run your app. You shall now see your React Native app running inside of the **ReactView**.

![Example](http://7qn8cx.com1.z0.glb.clouddn.com/0c4e7b977f1db688b60f1579a581f30dd1abc85f-86bebe4092e82c395e322fefcc8f7727b0820ac7.png?imageView2/2/h/400/w/400/q/85)

This comment has been minimized.

Copy link
@vjeux

vjeux Mar 31, 2015

Contributor

same here

@vjeux
Copy link
Contributor

vjeux commented Mar 31, 2015

This is really good thanks! Can you use local images and then i'm good pulling it in

@brentvatne
Copy link
Collaborator

brentvatne commented Mar 31, 2015

👍 great addition to the docs

@iamdustan
Copy link

iamdustan commented Mar 31, 2015

Could we change the file name from EmbededApps to EmbeddedApps?

@tjwudi
Copy link
Contributor Author

tjwudi commented Mar 31, 2015

@iamdustan Opps! Look how naughty my fingers were. Will correct the typo soon.

@iamdustan
Copy link

iamdustan commented Mar 31, 2015

@tjwudi ;) I have a few coworkers who have corrected my spelling plenty. I’ve gotten to be extra careful.

@tjwudi
Copy link
Contributor Author

tjwudi commented Mar 31, 2015

@vjeux @iamdustan Fixed. See 4040295 and 35bea5f

vjeux added a commit that referenced this pull request Mar 31, 2015
Add guide for using React Native in existing iOS App
@vjeux vjeux merged commit af9f097 into facebook:master Mar 31, 2015
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@vjeux
Copy link
Contributor

vjeux commented Mar 31, 2015

Thanks!

@iamdustan
Copy link

iamdustan commented Mar 31, 2015

👏👏

@kennydee
Copy link
Contributor

kennydee commented Mar 31, 2015

👍
Thanks all ! ;)

@lvyile

This comment has been minimized.

Copy link

lvyile commented on docs/EmbededApp.md in b873fd6 Mar 31, 2015

There no need to change dir? Because the ReactComponent at project root (https://github.com/tjwudi/EmbededReactNativeExample)

@Bintong
Copy link

Bintong commented Aug 1, 2016

if no cocoapods how to do

jfrolich pushed a commit to jfrolich/react-native that referenced this pull request Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.