React Native

Most of my mobile development is in creating native Android solutions. However, I sometimes need to create iOS apps as well. I have done native iOS development, but if I need to have a cross platform solution, it obviously requires twice the effort (and cost) to create native apps for both versions. And, when you’re done, you have to maintain two different apps as well as deal with bugs on two different versions. Throughout the years, a variety of solutions have been made available – and with the continued growth in the mobile market, I expect to see more tools available in the future.

During the past week, a colleague recommended that I look at React Native for creating cross-platform apps. Then, yesterday, a customer asked me to create a mobile app for them on both iOS and Android. So, I decided to investigate React Native.  The website for React Native talks about how you can use JavaScript to create native apps – not hybrid web apps, but real native apps. That sounded very exciting! I installed their framework without much trouble and began tinkering around. While I am not a fan of JavaScript for larger projects, I realize that it has become the language of choice for a growing number of tools because of it’s widespread acceptance. I used Visual Studio Code as my IDE, connected my demo app to a REST service, and had a trivial mobile application running in minutes. The most awesome part of React Native development is that the test app on your phone is always in sync with the changes you make on your development computer – without a USB cable – so long as you are on the same WiFi network. Now, the next step – create an actual Android APK to push to HockeyApp for distribution to my software testers. Wait… there is no easy way to do this. I have to ‘eject’ my project from React Native – a process which I am warned is not reversible – and then use native tools to build the APK. So, I can start the project in React Native, but then have to export the project to a native form to actually deploy. This was a show stopper to me – I don’t want to have to export to native tools as that invalidates the entire purpose of a cross-platform project to me. I dug through the documentation trying to see if I was missing something, and others had asked the same question. As I dug further, I saw numerous users complaining about how out-of-date the documentation was. That concerns me – if I want to learn the framework, I need to be able to rely on the documentation. Having found no way to easily create an APK, I gave up.

In the end, for this project, I think I will stick with Cordova. It may not be as exciting as React Native, but I can chose whatever frameworks I want to use – be it a high-tech Angular app or a simple HTML5/JavaScript application. The tools work well, and – maybe one of the most important things to me – the project can be maintained by anyone who knows HTML5.

 

 

Leave a Reply