Question

I have developed a few Android applications and am currently working on developing an iOS application from scratch. Is there any method by which I can focus on developing my iOS application in such a way that I can reuse some of its components or features for developing the same application on the Android platform?

Was it helpful?

Solution

Is there any method by which I can focus on developing my iOS application in such a way that I can reuse some of its components or features for developing the same application on the Android platform?

You can if you use web technologies (HTML, CSS, Javascript). You can do that if you build a web-based app or a hybrid app, i.e. one that uses web-based content running inside a native shell. Look into PhoneGap if you're interested in building a hybrid app -- it offers a quick way to get started. There are also some cross-platform frameworks like Titanium that purport to offer write once/run on several platforms functionality.

If you want to build an app that's fully native on both platforms, you won't be able to reuse application logic. iOS and Android use different frameworks written in different languages running on different hardware, and apps on each platform work somewhat differently as well. Even so, what you can re-use is whatever work you put into the infrastructure that drives the apps. Most apps rely on some sort of server infrastructure to supply or collect data, and that server component can easily serve apps running on either platform.

OTHER TIPS

If you are developing the same application, then you can use j2objc to translate your java (non-UI or hardware/platform specific) code to objective-c.

From the description:

J2ObjC is an open-source command-line tool from Google that translates Java code to Objective-C for the iOS (iPhone/iPad) platform. This tool enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary. The goal is to write an app's non-UI code (such as data access, or application logic) in Java, which is then shared by web apps (using GWT), Android apps, and iOS apps.

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