Android programming language to ios programming language?

In summary: Another would be the fact that you would need to have a Unity account in order to use Xamarin, which can be expensive.What country is that, if I may ask?Iran !
  • #1
Prof.gaming
18
0
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 which 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 ?
 
Technology news on Phys.org
  • #2
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 learned something about unity !
 
  • #4
Prof.gaming said:
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 learned something about unity !
What country is that, if I may ask?
 
  • #5
Rectifier said:
What country is that, if I may ask?
Iran !
 
  • #6
Prof.gaming said:
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 which 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
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
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
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
TheDemx27 said:
[...] It's costly! :rolleyes:
Expensive ? These are calculated per month or year.
Also. do you like dotNet ? It is always for free.
 

FAQ: Android programming language to ios programming language?

1. What is the difference between Android programming language and iOS programming language?

The main difference between Android programming language (Java) and iOS programming language (Swift) is the syntax and structure of the language. While Java is a more traditional object-oriented language, Swift has a more modern and concise syntax. Additionally, Swift is only used for iOS and macOS development, while Java can be used for a variety of platforms including Android, web development, and more.

2. Can I use my Android programming knowledge to learn iOS programming?

While there will be some similarities between the two languages, there are enough differences that it would be beneficial to learn Swift specifically for iOS development. However, having a strong understanding of programming concepts and logic from Android programming can definitely make the learning process easier.

3. Are there any major differences in the development process for Android vs iOS?

Yes, there are some differences in the development process for Android and iOS. For example, Android development typically involves using an integrated development environment (IDE) such as Android Studio, while iOS development uses Xcode. Additionally, the app distribution process is different for each platform.

4. Can I develop an app for both Android and iOS using the same programming language?

Yes, there are cross-platform development tools that allow you to write code in one language and deploy it to both Android and iOS. Some popular options include React Native, Flutter, and Xamarin. However, these tools may have limitations and it is still beneficial to have knowledge of both Java and Swift for native development.

5. Is one programming language better for mobile app development than the other?

It ultimately depends on your personal preferences and the specific requirements of your project. Both Java and Swift are widely used and have their own strengths and weaknesses. Some developers prefer the familiarity and versatility of Java, while others appreciate the modern and user-friendly nature of Swift. It's important to consider your goals and the platform you're targeting when choosing a programming language.

Back
Top