React Native Installation iOS and Windows : Part 1
React Native Installation iOS and Windows : Part 1- We often need to list youtube video of a playlist and play it in Android and IOS App . Youtube easily provide data in xml by playlist id. Here I am going to explain how to parse video xml and play video using WebView component in react native.
Page 1: React native installation process on windows and ios
IOS:
Dependencies for IOS
- XCODE from App Store https://developer.apple.com/xcode/
- Copy code from brew.sh and paste in terminal. Press Enter
- Node : brew install node
- Watchman: brew install watchman
- React Native CLI: npm install -g react-native-cli
Finally run command to create your project.Please open terminal and run this command:
react-native init youtube_video
To open Simulator. Please run this command
- cd youtube_video
- react-native run ios
Window:
Installation of Dependency for Window. It is long process
- Installation of Java http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Installatiion of Node Js : https://nodejs.org/en/
- Installtion of Android Studio : https://developer.android.com/studio/index.html
- Then open command prompt in window , win + r, type cmd then press enter
- Run command npm install -g react-native-cli
- Then install react native in drive where you like
- Type E: or C: or D: where you want to install
- Run command react-native init youtube_video ( or which name you like )
- Open android studio and click on open an existing android project
- Please select android folder in your youtube_video folder and click ok
- Open message tab in android studio and if you see any update please click on link if it is there
- Create virtual device: Open Tool menu on top then android > AVD Manager
- Click on create virtual device select which device you want to add as i select Nexus 5 click on next then click on download button of Marshmallow
- On popup window you will see installation start and after finish click on finish button
- Then in window select Marshmallow and click on next and on next window click on finish
- You can see you virtual device in list , In action column click on green arrow to open it
- Now we need to set environment of our system
- Search system setting in window search then select View Advance System Setting
- Select Advance tab
- Click on Environment variables button
- In user variable section , please click on new button
- Variable name : JAVA_HOME
- Variable Value: Then click on browse directory and select path where android sdk folder so click on c: > Program Files > Java > jdk1.8.0 (what is folder name of java there)
- click on path on user variable then click edit and click on new button and enter c:\Users\Computer\AppData\Local\Android\sdk\platform-tools
- to check this open any directory and type this path in top path bar you will see all files and folder of sdk folder
- Now open command prompt and cd your project directory path run react-native run-android and you can see your project in similator now
We are all done for window