Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting an iOS Objective-c app to Android Java [closed]

Tags:

android

ios

My app is a medical data viewer, where patients wear a sensor that transmits data by Bluetooth low energy. The app was developed in Objective C, targeting the iOS platform. Now the app needs to be ported to the Android platform.

The current design and implementation for iOS is as follows:

  • communication - Objective C, specific to the Core Bluetooth API
  • data/persistence - Objective C, using FMDatabase as the interface to SQLite
  • algorithms/logic - Objective C
  • ui - JavaScript/HTML5 based on Phonegap

Since the communication is specific to the Core Bluetooth API, it will have to be re-written for Android. The ui layer should be readily portable without much change as it fully depndendt on Phonegap. Yet for the persistence and logic layers I am looking for a way to either convert them automatically to Android, or re-write them in such a way that they are reusable for both platforms.

What is the best software engineering approach to implement a cross-platform app like this?

like image 666
miraculixx Avatar asked Dec 29 '12 12:12

miraculixx


People also ask

Can you port iOS apps to Android?

The first step for porting iOS apps to Android is design development. The two OS environments are entirely different from each other, and they act differently. So, as a development team, while porting your iOS app to Android, you must avoid copying the design elements. Material design offers a boost to Android.

Can you use Objective-C for Android?

In addition to the compiler you'll also need the Objective-C runtime, which exists open-source as libobjc2 and works on Android. With this, and using GNUstep as an implementation of the Objective-C frameworks (i.e. Foundation) you can absolutely use Objective-C code on Android.

Can you code an iOS app with Java?

Can I develop iOS apps with Java? Yes, if you are a Java developer, you don't need to learn Swift or Objective-C to develop iOS apps. You can use Codename One to develop iOS apps using Java or Kotlin.

Can you code an iOS app in Android Studio?

The Android system uses the instruction set of the Java virtual machine called ByteCode. iOS, on the other hand, implements the compiled code. Running Android apps on iOS is not possible because of the following factors: Different lifecycle of apps in the system.


2 Answers

Seems like there is: http://code.google.com/p/objc2j/

The repository should be accesible via http://objc2j.googlecode.com/svn/

Didn't check it myself, so please post your opinion on this.

like image 194
Stavash Avatar answered Oct 22 '22 04:10

Stavash


Google has some open source projects that do this.

You will need to use SVN to access these repositories. Here are the links:

Java to Objective C: http://code.google.com/p/j2objc/

Objective C to Java : http://code.google.com/p/objc2j/

Good luck!

like image 44
Anup Cowkur Avatar answered Oct 22 '22 03:10

Anup Cowkur