![]() ![]() This is done by executing a series of xcrun simctl commands. When no device is specified, run-ios would launch the app in Debug mode on a simulator by default. Max's iPhonereact-native run-ios -device "Max\'s iPhone" #Build the app in Release modereact-native run-ios -configuration Release Device/Simulator selection run-ios accepts certain options such as: #Launch the app on a specific simulatorreact-native run-ios -simulator "iPhone 5" #Pass a non-standard location of iOS directoryreact-native run-ios -project-path "./app/ios" #Run on a connected device, e.g. run-ios is one such utility which invokes the runIOS() function defined in the runIOS.js file. These can be found under the local-cli folder of the React-Native node module. React-Native provides a number of command line utilities to work with the app. For this to happen, there are a bunch of steps which are executed when we run the above command. Successful execution would open the app on a simulator or a connected device. React-Native apps can be launched on iOS simulators/physical devices by running the following command in the root folder of an app: react-native run-ios This template creates the relevant Xcode project files under the iOS folder of the app. It creates a native app template for you. React-native provides this neat utility called init. Without further ado, let's try to understand the what and how of the process to run React-Native apps on iOS. ![]() React-Native provides command line utilities to run an app on iOS and Andriod simulators/devices. I want to help any other person who is starting off afresh with React-Native app development. Partly, that was the motivation to come up with this piece. There was no one place which summarized what React-Native does to get the app working. I spent a lot of time going through the relevant code. I was also curious to understand what happens under the hood when React-Native runs an app on a device or a simulator. I was surprised by the ease and level of abstraction provided by React-Native’s command line interface. This was my first foray into native app development. I recently started to develop a React-Native app on iOS. By Soujanya PS How to run a React Native app on iOS ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |