Tuesday, May 16, 2017

Developing native iOS and Android apps without installing Xcode or Android Studio!

Want to learn iOS programming but don't have a Mac? Want to learn Android programming but facing a lot of difficulties in setting up the SDK? Well, you can now learn how to write cross-platform native apps using the new Create React Native App (CRNA), without needing to install Xcode or Android Studio! This means that you also don't need a Mac to learn iOS programming!

With CRNA, all you need to do is to install node and npm on your computer. Then, install the CRNA command line tools:

$ npm i -g create-react-native-app

To create a project named HelloWorld, use the following command:

$ create-react-native-app HelloWorld
$ cd HelloWorld

Once the project is created, the project folder will contain the following files:

  • App.js  
  • App.test.js 
  • README.md 
  • app.json 
  • node_modules 
  • package.json

You would develop the app just like a normal React Native app. When you are ready to test the app, simply use this command:

$ npm start

A barcode that is unique to your app will now be generated.

That's it! To view your app, download the Expo Client app on your iPhone or Android device. Scan the barcode unique to your project and voila, your app now runs on your iPhone or Android.

I think this is the coolest way to learn iOS and Android programming!

No comments: