Technology Security Analyst
Expo is a platform with a set of tools and services built around React Native and its ecosystem that help us develop, build, and quickly deploy IOS and Android apps.
As we referenced above, we utilized Expo to channel the super normal issues from React Native.
In case you previously worked with React Native previously or on the other hand assuming you're going to construct your next portable application utilizing this library, you're probably going to track down a couple of issues. Here are the best 5 ones we experienced and how we settled them:
In the first phase of our app, everything was running smoothly, as we were just testing everything on IOS (we didn't have plans to run the app on Android devices). In the second phase, we were told that an Android version was also needed. While we rested our minds assure, as the tool we chose could make that happen, problems started to appear.
The first run on the Android Emulator did't work as we expected. As we were going through the debug (which was very hard to do due to the lack of debug support), the Android Emulator broke and didn't show the error message. We figured out a way to capture the error message by recording the screen. This led us to discover that the change of the style that was made dynamically to handle the animation of the elements in the Login screen, doesn't work on Android the same way it works in IOS. Android does not support flex transformations. We were changing columns to rows, so we had to change our approach to be able to have this animation working properly on IOS and Android.
When you're writing code in a cross-platform tool, you can assume that the app would behave the same way in both platforms. While this shows as true for most of the cases, we discovered some main characteristics in our development that were tricky to address. For example, the box-shadow and some libraries, like will mention in the next section, don't work as expected on Android devices.
If your app requires deep native functionality, most of the time, your team will need to work with native code, as shown by Airbnb in their article.
One of the biggest challenges faced while building this mobile application was how to manage the image assets. We decided to use the SVG format with one of the most used libraries, react-native-svg. Since the app had a lot of complex draws, we used SVG to avoid losing quality. Turned out that the library to handle SVG was not working on Android the same way that it works on IOS. In some cases, it didn't work at all with some images not showing after the build. We had to look for a solution which we found in the documentation: it was needed to distribute the images as static resources and use the native way of handling images. That means choosing the right one by the screen density.
During the mobile app development, we also had to deal with box-shadow handling. While IOS behaved normally, (with one web page having several ways of styling the box-shadow) Android had just one prop. It's called elevation and has just one control over the depth of the shadow. Again, another adjustment on the components to be able to emulate the box-shadow effect. Here we used some transparent PNG to emulate the box-shadow transparency on our screens.
To be honest, conveying and testing portable applications are not React Native issues per si. The test to have an application running in a customer's cell phone before the authority organization into the stage, is notable. At our improvement stream, we have picked Expo for its straightforwardness, to ease process. Our partners set an emulator on their machines (inside the main essential of being a MacOs gadget) and after the improvement run of the application, they could test the application. To have the application dealing with their gadgets, we needed to run exhibition build:ios - t 'test system' - discharge channel organizing (which produced one .ipa document fit to be introduced into the gadget emulator) and exhibition build:android - t 'test system' - discharge channel arranging, an .apk record that could likewise be introduced on an emulator or on a genuine gadget, since Android is more adaptable with regards to applications being introduced on their framework.
Exhibition comes as an incredible assistance when we really want to fabricate portable applications, as it permits to smooth out React Native intricacies. In spite of its cons, it facilitates the progression of making portable applications, further developing the testing system.
The Expo moves begin to seem when your versatile application begins to develop and its functionalities become more mind boggling. Despite the fact that you might observe a few issues as the ones we've referenced above, React Native is an incredible system. Truth be told, it shows as one of the greatest cross-stage systems with an extraordinary environment of libraries, instruments, and obviously, a monster behind it: Facebook.
By consolidating it with Expo, we can deliver magnificent portable applications to our clients, with a little group, in record time. Every one of the blunders found while making this React Native portable application could be settled with the fundamental investigate time and local area help.
Subscribe to get latest updates