Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Android programming language to ios programming language?

  1. Sep 3, 2015 #1
    I mean something like a translator ( a convertor , if you prefer ) for another platform , windows for example , to translate the codes of an android program that is written in java language to the ios language wich is Xcode . That way , lots of apps that are unavailable for android or ios , would then be available .
    I know it is illegal , but considering using it in a country which the copyright laws are not an issue ( like my own country , iran ) . I was wondering , is it possible ?
     
  2. jcsd
  3. Sep 3, 2015 #2

    jedishrfu

    Staff: Mentor

    We don't discuss breaking copyrights here. Technically programmers can build emulators for any code base but practically trying to run iOS code on an Android using an emulator and vice versa would be very slow and painful.

    There may be software tools to convert Java to Objective-C or to Swift so that a developer can support both platforms but again things get reduced down to the common elements of the platforms and unique features can't be used.

    The Unity game engine is an interesting platform where you write code once in either Javascript or C# and then deploy it to multiple platforms. They can deploy to Android, to Apple iOS and others.
     
  4. Sep 3, 2015 #3
    I just wanted to know if it was possible , not to do it ... but its legal in my country ... I just wanted to know :)
    At least I learnt something about unity !
     
  5. Sep 3, 2015 #4

    Rectifier

    User Avatar
    Gold Member

    What country is that, if I may ask?
     
  6. Sep 3, 2015 #5
    Iran !
     
  7. Sep 8, 2015 #6
    An Android application written in Java or native C/C++will be of little use if another version of it isn't made in Objective-C or C/C++ in iOS. It is not necessarily a violation of the copyright if 2 different companies sell same game product. Programming languages are the same (e.g old classic war of Java against C#), even today both of them still share many places in their open source code where the implementation is done using the same algorithms with only different coding styles. I always wonder what one actually thinks when he claims publicly that his resources are open but then still insists payment for them if any is commercially put into use.
    BTW, people tend to use *Platform* to indicate system types e.g 32 vs 64 bit not the OSes (Linux and Mac are two different OSes).
     
  8. Sep 8, 2015 #7
    In most cases there can't be a simple way to automatically convert code written for one OS so that it runs for another OS.
    As mentioned earlier there are things called 'emulators' which try to mimik the original OS whilst actually running under a different one, but the problem with this is that the emulator itself can use up an enormous amount of CPU resources,so while your program might work this way,it will run too slow to be of any use.
    In practice the only way to be sure of getting a workable result is to re-write the source code to target the new OS. (you might get an acceptable result using an emulator on a powerful desktop PC, but unlikely with relatively weak mobile system).
    Rewriting the code could be partially automated, but quite a lot of it would need to be done manually because the code for the original system will likely be making use of libraries and OS calls which have no direct equivalent in the target OS.
    Unity gets away with it by using 'Mono' as it's primary library, which is an open source equivalent to Microsoft's .Net framework. Being open source it's available for all machines and OS, not any particular one.
     
    Last edited: Sep 8, 2015
  9. Sep 8, 2015 #8

    TheDemx27

    User Avatar
    Gold Member

    You can use Xamarin. You can develop for both android and apple devices with one single code project. It's in C#, which I prefer to java anyways.
     
  10. Sep 9, 2015 #9

    jedishrfu

    Staff: Mentor

    What limits have you seen with Xamarin so far?
     
  11. Oct 18, 2015 #10

    TheDemx27

    User Avatar
    Gold Member

    Heh, sorry for the late reply.

    I haven't used Xamarin that much to actually learn any particulars, the main reason being that the free trial lasts a couple weeks and it is rather expensive. So that is one major con I can think of: It's costly! :rolleyes:
     
  12. Oct 18, 2015 #11

    jedishrfu

    Staff: Mentor

    I'm tending toward the MEAN web stack and the using Adobe Phonegap to make the web app.

    https://en.m.wikipedia.org/wiki/MEAN_(software_bundle)

    Recently though at work, we used the Android SDK and Processing to create a proof of concept app on Android which was quite cool.
     
  13. Oct 19, 2015 #12
    Expensive ? These are calculated per month or year.
    Also. do you like dotNet ? It is always for free.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Android programming language to ios programming language?
  1. Programming Languages (Replies: 19)

  2. Programming language (Replies: 10)

  3. Programming languages (Replies: 16)

Loading...