Live data from Hacker News

Ask HN: Best way to write an app for both Android and iOS?

news.ycombinator.com

1–10 of 54 posts

Ask HN: Best way to write an app for both Android and iOS?

#1
I need to write an application that can run on both Android and Apple devices. At this point I have found a couple of solutions:

* Use a framework such as Appcelerator Titanium or PhoneGap,

* Use C++, and then write the UI parts both in Java and Objective-C (as C++ can be run on both platform),

* Write everything twice...

What are your experiences and suggestions regarding this problem?

EDIT: I'm working on the mobile application for our school, we need more than a website because we want to do stuff like Wifi triangulation, maybe also AR.

Re: Ask HN: Best way to write an app for both Android and iOS?

#5
post #3

You can check out Corona from Ansca as well: http://www.anscamobile.com/ This IDE is geared for graphical oriented apps (games).

Corona looks good (even if we're not doing a game) but as students a free solution would be better.

Re: Ask HN: Best way to write an app for both Android and iOS?

#6
post #2

Is there a particular reason why you can't or don't want to write it as a web page instead?

And make a simple app that shows the application via a webview

That's basically what PhoneGap does, although it also gives you JavaScript APIs to get at hardware features like the camera.

Re: Ask HN: Best way to write an app for both Android and iOS?

#8
I'm in the middle of trying to solve this challenge at work as well. I've bounced back and forth between a PhoneGap like solution, and doing it all in HTML with a web view wrapper.

The benefits of the HTML with webview are consistency, developing once, and being able to have a web app, blackberry app, webOS app as well.

However, if the app you're making needs to really leverage the functionality of the device, PhoneGap or making the device-specific logic in that native language is probably worth the extra effort (the trade off there is in efficiency of your app, and may be limited by the functionality of web pages on your mobile platforms.)

Re: Ask HN: Best way to write an app for both Android and iOS?

#9
Depends on what kind of app it is.

Is it a video game (use C++) or a web app (use PhoneGap), or a normal app (write everything twice, 'cause users expect platform specific look-and-feel.)

For what it's worth, two additional cross-platform frameworks you might want to look at are:

Corona (Lua-based, already used for hit iOS games.)

Unity3D (cross-platform 3D game engine.)

Post reply on HN