Many of us involved in mobile application development with React Native have been used to working on Expo. This makes complete sense since the React Native documentation itself has indicated that it is the easiest way to get started.
That said, if you are interested in eventually publishing your app on the App store, you might want to start getting used to working with Xcode. That’s because starting April 2021, all iOS and iPadOS apps submitted to the App Store will be required to be built using Xcode 12.
So, let’s get started. If you don’t already have Node and Watchman installed, you should get them via Homebrew using the following terminal commands:
brew install node
brew install watchman
While you probably have these as a React Native developer, it is a good idea to at least install Node 10 or later.
Of course, you’ll need to install Xcode. You can just download it from the app store here. Next, you’ll need CocoaPods, which manages library dependencies for your projects when using Xcode. So, install using:
sudo gem install cocoapods
Now we’re ready – are you exiting to get started on your new app? To start a new project, navigate to where you would like to save it, then in your terminal type,
npx react-native init <the name of your new project>
Your project will have starter boilerplate code, which you will be able to see once you open it in your code editor. To run your project and view it in a mobile device simulator, simply type,
npx react-native start
npx react-native run-ios
Now you are ready to start programming and to see your work on the simulator. Happy coding!