Android programming language to ios programming language?

  • #1

Main Question or Discussion Point

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 ?
 

Answers and Replies

  • #2
11,889
5,543
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.
 
  • #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 !
 
  • #4
Rectifier
Gold Member
313
4
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 !
What country is that, if I may ask?
 
  • #6
156
203
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 ?
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).
 
  • #7
3,379
943
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:
  • #8
TheDemx27
Gold Member
170
13
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
TheDemx27
Gold Member
170
13
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
156
203
[...] It's costly! :rolleyes:
Expensive ? These are calculated per month or year.
Also. do you like dotNet ? It is always for free.
 

Related Threads on Android programming language to ios programming language?

  • Last Post
Replies
16
Views
3K
Replies
122
Views
8K
  • Last Post
Replies
2
Views
768
  • Last Post
Replies
10
Views
5K
  • Last Post
Replies
19
Views
7K
  • Last Post
Replies
1
Views
694
  • Last Post
Replies
18
Views
8K
  • Last Post
Replies
15
Views
3K
  • Last Post
Replies
2
Views
501
  • Last Post
Replies
12
Views
2K
Top