I'm new to mobile phones development, but I wonder whether there is any way to develop native apps (HTML-based apps is another story) that would run both on Android and iPhone? I know that there exist applications available for both OSs, so I wonder how are they ported/developed for both targets?
Asked
Active
Viewed 1,164 times
1
-
possible duplicate of [Technology to write iPhone, BlackBerry and Android phone at the same time?](http://stackoverflow.com/questions/821085/technology-to-write-iphone-blackberry-and-android-phone-at-the-same-time) – Brad Larson Sep 20 '10 at 16:49
-
See also [What work has been done on cross-platform mobile development?](http://stackoverflow.com/questions/51988/what-work-has-been-done-on-cross-platform-mobile-development), [cross-platform development for mobile devices](http://stackoverflow.com/questions/2380196/cross-platform-development-for-mobile-devices), [Crossplatform iPhone / Android code sharing](http://stackoverflow.com/questions/2380258/crossplatform-iphone-android-code-sharing) and many other similar questions. – Brad Larson Sep 20 '10 at 16:50
3 Answers
3
You can simply have two different projects, with same design and graphics, or, you can do it with some frameworks like PhoneGap or Rhomobile.
The best way is to have two different versions of the code, so you can take advantage from the platform that you are using.

bontoJR
- 6,995
- 1
- 26
- 40
-
I wouldn't recommend Rhomobile, the Rhodes framework is not mature enough in my opinion. The resulting interfaces are pretty clunky and very non-native feeling. Check out the apps they list under their customers before making your decision, and note that Wikipedia no longer uses Rhodes. – Chris Wagner Sep 21 '10 at 23:52
-
Of course the best way is have a different native version of the app for every platform. – bontoJR Sep 22 '10 at 11:20
-
Ok, but that really basically means writing the same application twice. No way to re-use code (at least to some extent), while still keeping the advantages of native apps? Is it a common practice to write apps from scratch (only sharing resources)? – akoprowski Sep 22 '10 at 11:53
-
Yes you can using cross-platform framworks, but the result is a not the best you can have as if you do it as separate projects. To be honest, I think that big dev teams use only shared resources and do it as separates projects. But if you want to use a framework to spend less time in it, you can of course, but be careful in you choice. Personally I've tried Rhodes, it looked really good at the start, but after some weeks, I'd understood that split the two projects was the better way, but maybe it was because the project was really complex. – bontoJR Sep 23 '10 at 08:22
0
You can share a significant amount of Non-UI logic and code libraries by taking advantage of MonoTouch and MonoDroid. They are native frameworks which provide C# bindings around iPhone's and Androids native APIs. They have the added advantage of being able to develop in C# which IMHO is nicer than Obj-C and Java.

mythz
- 141,670
- 29
- 246
- 390