Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is programming for Android completely different from programming for iPhone?

Tags:

android

iphone

I have made apps for iPhone, but want to also code for the Android but want to know if it is first worth my time, second worth my having to learn another language, and third worth the effort in the sense that am I going to make a profit from this. Also if in any way Android code is similar, then will it be hard to bring the iOS (Xcode) files, or copy and paste my iOS code into the Android code.

like image 615
Jab Avatar asked Aug 09 '26 06:08

Jab


2 Answers

It's a most definite no. As iPhone Guy pointed out, there's a major difference in the languages both platforms require. iPhone uses Objective-C whereas the Android is based on Java (don't know if it's Mobile Edition or "regular" though). In addition, it's a completely different set of APIs. iPhone uses a modified form of Cocoa called Cocoa Touch whereas the Android makes uses of Google's SDK for it. In answer to your question, you won't be able to copy/paste your code between the languages. Your Objective-C code won't compile to Java and vice versa.

like image 100
FloppyDisk Avatar answered Aug 11 '26 21:08

FloppyDisk


Yes -- programming on the iPhone uses Objective-C while programming for Android is in Java. Although they use similar concepts, the two languages are different.

I was a Java programmer before switching to Objective C. Personally I like Objective C better than Java, but that's just a personal opinion ;)

like image 44
iPhone Guy Avatar answered Aug 11 '26 20:08

iPhone Guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!