Setting up an expo CLI for development
Hello developers, let’s set up an expo CLI into the machine to start an app-development !
Prerequisites,
You need to have a node install on your machine, haven't? get node from here.
You must have simmulator on your machine. If your mac user you can have Xcode(get from app store) and android both, but this choice is limmited to android for windows user’s, get android studio here.
Let’s check the version of our node and npm, to do so run following command in terminal.
node --versionnpm --version
This will show your version in terminal like,
Now we need an expo CLI for initializing our app’s, so we get an expo globally
npm i -g expo-cli
This will install expo CLI on your machine. If your Mac user, you need to prefix this with ‘sudo’ and to install that, you were asked for the password by terminal, go ahead and install expo.
After setting up all, run following command to create a new expo app.
expo init blog-app
This will prompt for choosing template for your project,
will go with blank,
Congratulations developers! we have created a new expo app.
Now change your directory to project folder,
cd blog-app
and start the project.
npm start
To check the live changes made by us, we need simulator provided by android studio for android, and Xcode for iOS.
So we start the respective simulators first and then press ‘a’ for android build and ‘i’ for iOS build,
For the iOS were going with i,
this will open an app in iOS simulator provided by Xcode.
Note: you need to start simulator first otherwise pressing i may give you an error.
Now your app should look like,
Congratulations we have successfully run our first app!
Now, we will get the app in our hand!
To do so, we need expo in mobile, go ahead and download expo from google play store for android, and from apple store for iOS.
now open the app and scan the QR provided in terminal after starting the project, BOOM! you may now have your app in your hand!
This is very useful for wireless debugging.
Hey developers and readers, thanks for reading till the end! any suggestion may appreciated in comments and stay with, as were going to build an minimal blog app here.