There's more...

By using the Expo client, CRAN lets you develop for iOS, even if you don't own an Apple computer. (You cannot develop for Apple systems if you have a Windows or Linux machine; you must have a MacBook or similar; this is a restriction of Apple's.) Also, working on an actual device is better in some ways, because you can actually see what the final user will see—no question about it.

However, there may be a couple of reasons why you would want to work differently, perhaps with an emulator on your computer that simulates real-life devices. Firstly, it may be difficult for you to get a dozen or so of the most popular devices in order to test your application on each of them. Secondly, it's more convenient to work on your own machine only, where you can easily debug, take screenshots, copy and paste, and so on. So, you could install Xcode or the Android SDK to enable yourself to work with emulated machines.

We won't be going into details here, because there are a lot of combinations depending on your development OS and the target OS; rather, let's point you to the documentation at https://facebook.github.io/react-native/docs/getting-started.html, where you should click on Building Projects with Native Code, and see what's needed in order to work with emulators. After having installed them, you will need the Expo client (as for your actual device) and then you'll be able to run your code on your own machine.

For instance, take a look at the Android emulator simulating a Nexus 5 in the following screenshot:

An emulated Nexus 5 running Android, directly on your screen

With this emulator, you have exactly the same functionality as with an actual device. For example, you can also get the debugging menu, though opening it will be different; for example, on my Linux machine, I needed to press Ctrl + M:

All the functionality that is available on your phone is also available with emulated devices

Using the Android Virtual Device (AVD) manager, you can create lots of different emulators for phones and tablets; you get similar functionality with Xcode, though that will only work on macOS computers. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.76.237