How hard would it be to implement the iOS API on Android?
-
Motivation: Apple makes you write iOS applications in C/objC/C++ using their libraries. Google/Android makes it easiest to write applications in Java using their libraries, but lets you do whatever you want, up to and including emulators. In particular, there is no rule against implementing the iOS libraries on Android so you can run compile your iOS application and run it. But is it feasible?
-
Answer:
Erm...all of it? All of NSFoundation and CocoaTouch and the frameworks like MapKit and CoreLocation? In Java? It would be a task of Herculean proportions.
Ian Peters-Campbell at Quora Visit the source
Other answers
High-level class interfaces aside, Android and iOS have different architectural philosophies about things like data access, process control, resource organization and loading, and overall program structure. Simply writing NSFoundation/CocoaTouch adapters in Java would therefore only get you part of the way there. The cross-platforms efforts that have gained the greatest traction ( and , for example) take a different approach: they use a common, platform-independent API that has per-platform extensions where necessary. That avoids the problem of mapping directly mapping Android to iOS, and vice-versa, but incurs the cost of adding an entirely new API with the overhead of an additional abstraction layer.
Jon Parise
Leaving the specifics of iOS and Android aside, I think you'll find that the answer's about the same in the general world of computing. You can write platform converters that take an RPG application and port it to Java, or other similar things, but they're both a lot of work and of limited value in the end. The only cross-platform development approach that's ever really worked is to build a single virtual platform or cross-platform library that you can run on multiple devices. These platforms tend to have their own limitations, but they're undoubtedly more successful than the "make my native code written for platform X run on platform Y" approaches. Finally, writing native code for each platform usually has the best result, but with the obvious cost of duplication of code, maintenance issues, etc.
Geoffrey Wiseman
It would be a huge effort and the result would a leaky abstraction. That would render it rather useless for serious application development. There would likely be so many bugs, performance differences and functional differences between iOS implementation and Android implementation, that you still couldn't run exactly same application source code in both environments. For example, Java ME is a collection of APIs that are meant to be portable, but because there are several different Java ME implementations with different bugs and performance characteristics, writing complex Java ME applications is really really hard. Google Maps is probably one of the greatest Java ME apps out there and even mighty Google doesn't try to port it to every Java ME implementation/hardware combination.
Teemu Kurppa
Related Q & A:
- How Hard Is The Ptcb Exam?Best solution by Yahoo! Answers
- How to open the dialog box dynamically in iOS?Best solution by Stack Overflow
- How can I programmatically extract a file quickly and efficiently within Android?Best solution by Stack Overflow
- How to change info Window style in Google Maps API?Best solution by Stack Overflow
- how to move files from internal memory to external sdcard in android?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.