Question

I want to develop an App for iOS and Android. For easier maintenance I want to have a shared codebase where the business layer and all the algorithms are implemented.
But I don't want to program the whole application in for example Xamarin. I would like to develop the presentation layer in Xcode and Eclipse and use a framework which has implemented the business layer, algorithms and so on.

It is very important for me that the presentation layer is programmed in the corresponding development environment (Xcode, Eclipse) and the shared codebase is implemented as a framework/dynamic library.

I tried Xamarin (Mono) and Qt for iOS but it seems like there is only the way to develop the whole application in this development environments.

To sum up what i wanna do:

                                  /--> iOS App --> implements framework --> .app
shared codebase* --> framework --<
                                  \--> Android App --> implements framework --> .apk

* e.g. Java / ObjectiveC / C# / C++ / Xamarian / Qt or whatever

Do you know any development environment or a trick how to do this whith Xamarian?
I googled a lot and didn't found anything which helped me solving this problem. I also know that here on stackoverflow are some questions covering this topic but they didn't completely answer my question.

Thank you a lot for your answers!

Was it helpful?

Solution

Xamarin allows you to create business logic in C# and use them for both Android / iOS / Windows Phone. You have to write your view logic also in C#. Xamarin has ported the API for both iOS and Android to C#. You can still use the designer tools from xCode (I guess for Android as well) and use them in your project. But it's true you'll have to use Visual Studio or Mono Develop to create your app.

So you either use the xamarin solution or you'll have to create a cross-platform library in C/C++. For iOS you can indeed just add C++ code. For Android you'll have to use the NDK. You'll have to use JNI (Java Native Interface) to be able to let the Java and C++ code talk to each other.

NDK: https://developer.android.com/tools/sdk/ndk/index.html

JNI Tutorial: https://code.google.com/p/awesomeguy/wiki/JNITutorial

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top