Simultaneously development of iOS and Android app in React-Native - android

I have been searching online for a while trying to find some best practices for simultaneously development of iOS and Android app in React-Native. I was wondering if anyone has any experience with this. Should we have two projects? Have one project with different views? Share the same views for the same components?
Appreciate your time!

How you organize your components is a bit of personal preference.
You don't need to organize by platform, however. Just name your components like so:
MyComponent.android.js
MyComponent.ios.js
React Native will automatically pick the right version of the component for each platform.

I think it should be one project. Here is my project structure:
/app/common/
commonComponent1.js
commonComponent2.js
/app/ios/
iosComponent1.js
iosComponent2.js
/app/android/
androidComponent1.js
androidComponent2.js
React-Native has %70-%80 code sharing for both platforms. Therefore you should one project and reuse common components for ios and android.

Related

How to use Kotlin with React Native in Android Studio?

I want to make an android app using Kotlin for the back end and Android Studio. For the front end, I understand that React Native would be a powerful choice, however I cannot figure out how to add ReactN to my Kotlin project.
I also tried creating a project in ReactN and then adding Kotlin: installed nodejs, npm and create-react-native-app, made the project. Then I tried opening it in Android Studio, but I wasn't getting any options to actually compile and run the project. So another question would be: can you work on ReactN projects in Android Studio or not?
If you could give me some resources on how exactly to do this, or if you can walk me through it step by step, it would be very helpful. I want to mention that I've never developed for Android or Web before (I'm mentioning about Web because I cannot rely on any Reactjs knowledge from Web dev).
React Native is whole framework, for front and back end, and have nothing to do with Kotlin (well, some Kotlin snippets may be integrated into RN app, thats all). RN projects are in fact multiplatform web/js based apps and Kotlin is used for writing pure Android apps, so this isn't a front/back end separation in here, these are just different approaches to development. Mixing both, while possible, makes no sense in most cases

Include react-vr in react-native

I would like to know if it's possible to integrate a react vr tour inside an Android and/or iOS app developed with react native. If so, how can I do it?
This is just an idea but I haven't found a real solution on-line.
Thanks for your attention.
(I'm Italian. Excuse me if you do not understand my English)
You can't actually mix the usage of these two libraries. react-vr depends on react-native but has a totally different runtime. One possible solution is having a web view in react-native and displaying the react-vr content inside.

Xamarin runtime "plugins" or scripts

We are designing a generic Android application using Xamarin Forms. At the same time, we need some texts that the user enters to be treated a bit differently for some of the customers, ie. run them through a custom transformation.
Instead of having to build a different version of our generic app, it would be great if we could define those transformations as an external dependency, as a pluggable "dll" or a text file with a script, maybe something like MoonSharp.
Does anyone have experience with something similar and how to achieve that in Xamarin Forms?
We did end up using the MoonSharp framework and the Lua scripting in two different projects, one on Xamarin, and another one on a classic windows service C# application. It was a great tool and gets the job done!

business processes Framework (Xamarin or ReactJS)

maybe someone can help me. In near future i'm going to develop a business processes application like this :
https://play.google.com/store/apps/details?id=de.semture.cubetto
https://play.google.com/store/apps/details?id=com.showgen.processcraft
Now i would like to know if there are some already existing Frameworks or projects for that. I just want play arount with that subject to get a feeling how it works and what i have to do. I'm planing to make it available for Android (highest priority) and Web (Ios and windows arent so important right now).
So my first question is. Are there any Frameworks, libs, project availbe for something like that?
I've already searched for some frameworks but without no success...
And the other question would be what Tool or language should i use ?
Currently i'm working with Visual Studios 2015 Xamarin (xml & C# based language). We all know that i can make crossplattform apps with xamarin. But some minutes ago i've heard that there is a language/Framework named React.JS, that is also for android ios and web apps.
Now my second question:
which one should i work with ? Xamarin or React.Js ? Which one would better fit to my project and what are the main differences ?
I hope someone could answer that :)
Thanks in advance
This really comes down to personal preference and what you are trying to accomplish. If you are a C# developer, then Xamarin might be your best bet for android. With using ReactNative, it will be a little easier to create your web app from since it uses React. If you are trying to have a native feel for the android app, you will still have to know some core android development for both platforms. If you aren't super worried about the look, feel, and performance of it being native, then you can look into ionic which is built on top of Angular, and this you can use as a web application as well as build it for android.

Xamarin.forms (or) xamarin.ios/xamarin.android (or) Native

We are developing an app in our organization where we have to implement charts,maps,GPS, If we Develop in Xamarin.ios/xamrin.android can developers able to share business logic of the app? since both android/ios projects will be in c#.
I'm doing exactly the same thing.
Do not use Xamarin Forms. It is not designed for nor capable of doing heavily customised UIs.
If you are going to require integration with Maps and also producing any kind of non-standard rendering or "User Controls" Xamarin.Forms is not going to work for you.
Go down the route of using a framework like MvvmCross to further abstract away the platforms and keep your core code / logic and user experience flow within the realms of a Core.Pcl type library.
Also I wouldn't try doing this on Windows 7 based bachines if you are doing this on Windows. Most of the components you will find yourself wanting to use will be targetting Profile259 and since Windows 7 doesn't support Windows Phone 8 you'll have all manner of oddities, even if you do the Profile259 hack.
Go with MvvmCross, Windows 8 and ignore Xamarin Forms.
I wrote a bit of it up on my blog.
Read this from Xmarin, they clearly state that Forms is for run of the mill business apps or for prototyping. It's not mature enough yet.
Yes, you can write your core app logic (services, data, domain, etc) in a PCL library that is shared by both your Android and iOS apps.
From my experience, you can build most apps in Xamarin Forms. The main hurdle is that doing anything not included in X.Forms requires that you write Custom Renderers. The thing is, writing custom renderers is much more straightforward if you have a solid grasp of vanilla Xamarin (Xamarin.iOS & Xamarin.Android).
What I think happens is that developers getting into Xamarin go directly to Xamarin.Forms and then become frustrated when they are unable to write custom renderers to accomplish some custom requirements.
So my recommendation is that if you have experience building apps using Xamarin.iOS and Xamarin.Android, Xamarin.Forms is awesome for getting an application developed rapidly for multiple platforms. Being able to use MVVM + XAML + Data Binding is a huge win.
If you are new to Xamarin or even mobile development, build the app using Xamarin.iOS and Xamarin.Android.

Categories

Resources