Question

I am interested in writing applications for the iPhone and the Android platform. I was hoping to find a middleware / framework that abstracted away some of the differences in the APIs and allow me to specify the target platform at build time. Is there such a framework existing or planned?

Was it helpful?

Solution

Phonegap is a javascript/css/html based framework that targets the iPhone, Android, and the Blackberry. It (on the iphone at least) can be bundled as a native app too. The UI layer for these apps typically is built in html/javascript and can be slower than a true native app.

phonegap


React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native. The UI for React Native applications are native controls - so your UI is usually faster than a pure HTML/javascript approach for GUI management.

React Native


Unity is a cross-platform game engine developed by Unity Technologies and used to develop video games for PC, consoles, mobile devices and websites. Unity is notable for its ability to target games to multiple platforms. Supported platforms include Android, Apple TV, BlackBerry 10, iOS, Linux, Nintendo 3DS line, OS X, PlayStation 4, PlayStation Vita, Unity Web Player (including Facebook), Wii, Wii U, Windows Phone 8, Windows, Xbox 360, and Xbox One.

Unity


OpenFL is an opensource port of the Flash API to Desktop,Browser,iOs,Android,Flash,HTML5,etc. and is an option to consider for those coming from a Flash world. It builds to native binaries and targets browsers as well (Flash/HTML5).

openfl


MonoGame is an open source implementation of the Microsoft XNA 4.x Framework. It makes it easy for XNA developers to create cross-platform games with extremely high code reuse. It currently supports iOS, Android, Windows (both OpenGL and DirectX), Mac OS X, Linux, Windows 8 Store, Windows Phone 8, PlayStation Mobile, and the OUYA console.

monogame


Adobe Flash And believe it or not, Adobe Flash can publish native binaries to ios, android, desktop and of course the web. The performance is reasonable, but not incredible. If you had a Flash game, you may be able to take it to mobile very easily. And this does not require any plugins of any sort. It actually creates a native standalone binary that runs on each platform.

adobe

OTHER TIPS

Edit: Since this question was asked a number of viable solutions have been developed. While the tone of this answer may still be accurate (To benefit 100% from the HW / OS a native app is likely necessary) you can find a number of possible answers below this question.

Both Android and the iPhone have very strongly defined user interfaces. Even if you found a framework that bridged the huge differences on the most lower aspect levels (Android is programmed in Java on top of a custom VM, iPhone is native code programmed in Objective-C) and in the higher levels (iPhone apps are a completely sandboxed and isolated, the Android object model is distributed and classes are freely invoked between apps and libraries) your final app would feel alien and out of place in either of them. Think about the lack of multitouch in Android, or the lack of dedicated hardware buttons in the iPhone.

Your best bet would be to develop a platform specific user interface and have the model and core logic of your application in some kind of scripting language. Then find an interpreter in plain C (for the iPhone) and one in Java (for Android.) Scheme, Lisp and Javascript could fit the bill. Just make sure the interpreter is not exposed to end users or you would be violating the iPhone NDA...

If your app is data-heavy you could follow the model of many iPhone apps and develop native user interfaces for iPhone and Android, and have all the application logic in a remote server. Your UI becomes the only installed part of the application and everything else is hosted away on the net. This has the added advantage of having the possibility to offer roaming profiles between different devices and a web interface.

Adding another service to the pile here: Rhomobile is looking to create just this. It does look quote dumbed-down -- think back to the web in the early 90's. But it could be the easiest way to port your favourite app to every major mobile platform.

More details: Rhomobile promises: Build once, deploy to any smartphone

( Note: I don't work for Rhomobile; just came across the story today. )

I have no direct experience with iPhone or Android, but I just read an article about "Titanium" and then when I visited their site, found this:

http://www.appcelerator.com/products/titanium-mobile/

I work(ed) quite a bit with the "native" solutions Obj-C and Java (4 Android). I also build an App with Appcelerator for iPhone and Android which works just fine. The Appcelerator APIs are quite extensive. The Appcelerator Kitchen Sink App shows a lot of elements and functionality ready to include in an app ( https://github.com/appcelerator/KitchenSink ). However since my Appcelerator app is not too complex I don't feel comfortable to generally recommend it. A colleague told me that their dev team tried it and they were not satisfied. He could not name a real reason though. However I will go on testing it to see where the limitations are. One big limitation is the platform support (currently only iOS and Android).

As to Rhodes, this solution looks quite impressive on paper, especially in terms of supported platforms. I see some problems with it though. First, the demo apps and kitchen sink app need a lot of disk space, run a bit choppy and look funky sometimes (at least on Android). Second, there very few "real world" applikations to find. I mean apps that have been downloaded at least more than 1000 times and serving real world needs other than just demo purposed. Usability to me has top priority in mobile (consumer) apps!

I see a big potential in HTML/CSS/JavaScript/PhoneGap apps. Recently I read quite some articles about bigger companies using HTML(5) to build their apps (eg. Netflix http://mashable.com/2010/12/03/netflix-html5/, Zynga http://www.spielsucht24.de/2010/12/21/zynga-launches-html5-mafia-wars-atlantic-city-for-mobile-web/) There are still some problems with usability and snappyness that need to be solved when building mobile apps with web technologies. Another problem could be the testing, debugging and maintenance of enterprise level HTML apps.

Rhomobile's Rhodes framework does this. Rhodes apps are native for each individual smartphone

Mytopia has an unreleased framework called RUGS. They presented recently at TechCrunch 50 conference and their technology looked very interesting. They were able to compile an application that ran on all smartphone platforms (and was able to take advantage of the abilities of each... accelerometer on the iPhone for instance). Unfortunately their website says you need to email them if you want more information. Might be worth shooting them an email if you really want to develop on a cross platform smartphone targeted system.

I watched their presentation over the TC50 webcast, but unfortunately am not able to find a video for you now.

Please post back here with a summary of what framework you decide to use and why you chose it.

QuickConnectiPhone lets you write your app in JavaScript and yet it is still installable. An Android version is in unreleased Alpha at this point.

Having both would allow you to create your app in JavaScript, CSS, and HTML, make calls down to either the iPhone or the Android phone for device behaviors such as vibration, GPS locations, etc.

The iPhone version is downloadable from https://sourceforge.net/projects/quickconnect/ and if you contact me I can send you the Android version.

Even if you really wanted to, it wouldn't be practical to make your own multi-platform framework – iPhone is native code, Android is Java.

Of course, there isn't anything stopping you from, for example, sharing the core C/C++ logic in a desktop application with its iPhone counterpart.

Check out this:

http://www.xmlvm.org/overview/

It is a project that attempts to be able to cross-compile programs written in a variety of source languages to a variety of target languages. One of the initial test cases was to write programs in Java and run them on an iPhone. Watching the video on the site is worthwhile. They have discussed the possibility of being able to target Android as well.

With that said, I haven't tried it. The project seems quite beta, and there isn't a lot of activity on their SourceForge site.

You can develop Java applications for IPhone with iSpectrum. This way you'll be able to re-use a consistent amount of your application code between Android and iPhone (and possibly desktop applets or J2ME MIDlets depending of what you do :) )

More infos at http://www.flexycore.com

Your best choice will be AirPlay, visit AirPlay web site

One click and you deploy for Android, Iphone, Samsung Bada, Symbian, Windows Mobile, BREW, WebOS and Maemo.

My book HTML5 for iOS and Android enables you to take web apps created in HTML, JavaScript & CSS, and turn them into standalone apps that you can upload to the app stores (for free or to sell) – http://html5formobile.com - the wrappers to do this for the iOS and Android SDKs are freely available on the website, and you don't need any knowledge of either programming language if you follow the instructions in the book.

I realize that this question is rather old, but it comes up on Google searches, so I thought it would be a good idea to update it.

I think a good framework out right now that targets both platforms and actually runs native, allowing to write good performing games would be Corona.

Link: http://www.anscamobile.com/corona/

we've had success with Ice-Touch middleware to have both iPhone and Android devices talking to same servers. with pretty decent code generation for network objects and methods. but local logic still has to be written in phone's language. this way we could leverage the UI advantages of each, while our model lives on the same server and our controllers are autogenerated.

link text

I just wanted to mention that a web application using the Gears plugin can make use of Geolocation (No longer Avaliable) (GPS and Wifi location services) and this works on Android (the browser on the G1 ships with built-in Gears support).

I'm not sure if there's hope of getting gears support onto an iPhone, but it's another useful approach to building webapps with extra features while still having a wide reach of devices.

Such a framework, by nature, couldn't take advantage of iPhone-specific features like the accelerometer or multi-finger gestures. It would also likely void Apple's SDK terms.

As andyuk suggested, consider writing a Web app. Basic features such as calling someone can be accessed that way.

There's nothing existing (worth relying on, if anything at all), and I doubt that there would ever be anything official planned.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top