Exciting Announcements at WWDC 2012: New MacBook Pro, Mountain Lion, and iOS 6
The cat is finally out of the bag. Apple announced some amazing new hardware and software at the WWDC 2012 keynote. There were some expected...
A common question that comes to us from our clients is whether to choose a native SDK development approach or go for a cross-platform framework app development approach to support multiple platforms. Another question they ask is which cross-platform framework is the best choice for the kind of application they want to develop. This article provides a quick guideline on preferred approach and compares key cross-platform frameworks.
Native app development approach is preferred for superior user interface, or when one needs to quickly take advantage of any new features released by a platform - cross-platform frameworks might take some time to integrate within them. Also, if one is developing an application where performance and security is critical, we suggest to go native.
But there are certain categories of apps where it is not necessary to go native. It is more important for them to reach out to larger audience and perform quick version updates. Examples include news and weather, retail and shopping and financial services apps which are usually simple data-driven apps. They may choose to use cross-platform frameworks as they allow apps to be available to multiple platforms using reusable code.
Cross-platform frameworks try to achieve code reuse with a unified API and thus help in:
When it comes to choosing between multiple cross-platform frameworks, choices boil down to comparison between PhoneGap/ Titanium in case of data-driven apps and Corona/ Cocos2d-x/ Unity in case of gaming apps.
A generic guideline for choosing a right cross-platform framework is as follows:
If you’re a web-developer are looking to create an app with native look and feel using your existing skills, Titanium is the right choice.
In case you want to port your app to multiple platforms with a single codebase, go for PhoneGap.
Use Corona/ Cocos2d-x for 2D games based on your development language choice - They make it very easy to add physics to your games with the underlying engine built around the well-known Box2D.
Use Unity for 3D games - It’s “a powerful game development ecosystem fully integrated with intuitive tools and rapid workflows to create interactive 3D games”.
Below chart summarizes some of the most recommended cross-platform frameworks for developing mobile apps:
Cross-Platform Frameworks Cross-Platform Game Engine Frameworks
Titanium
PhoneGap
Corona
Unity3D
Cocos2d-x
Titanium apps are developed using web technologies and are compiled into native apps.
PhoneGap apps are web apps running inside a UIWebView control.
Corona allows you to create games, ebooks, utilities or business apps but mostly used for physics-based 2D game development.
Cross-platform game engine with a built-in IDE used mainly for 3D model rendering and game development
Cocos2d-x is a game engine branched from Cocos2d-iPhone, which consists of expanding supported platforms
Development languages
HTML, JavaScript
HTML,JavaScript and CSS
Lua
JavaScript, C#
C++
Also supports Lua and Javascript (but limited platforms are supported on these languages)
Tools
Titanium Studio IDE
(an extensible, Eclipse-based IDE)
Standard tools of web development, such as Firebug, Web Inspector, and your text editor of choice.
Corona Project Manager (CPM),
Corona Complete,
Corona Cider
Unity IDE
Xcode,
Eclipse
Cost
Free
If you wish to use the Appcelerator Platform for public cloud, the cost is $999/ named user/ month
Free
Has a free starter kit, Pro license is $349/yr until April 30, 2013. After that it will be $599/yr
Free for the basic version and $1500 for the pro version (with a 30 day free trial for pro version)
Free (open source)
Platform Support
iOS support
Yes
Yes
Android support
Yes
Yes
Windows Phone support
On roadmap
(Window 8/ RT support expected in the second half of 2013)
No
In Beta
Unity Windows Phone 8 apps open beta
Yes
BlackBerry support
No
In Beta
Yes
N/A
N/A
Box2D
PhysX
Box2D, Chipmunk
Monetization Support
Available as free StoreKit module
Available as free InAppPurchaseManager/ InAppBilling Phonegap Plugins
Need to subscribe to a paid plan
You can buy a pre-made third party plugin or create your own. You need to buy suitable Unity license for Native Code Plugins Support
Yes (you may need to make calls to JNI (on android) and calls to Objective-C code for iOS)
Ads Support
Available as modules
Available as free plugin
iAds is among the first of many upcoming plugins. iAds is available in daily build 992
You need to buy suitable Unity license for Native Code Plugins Support
Yes
Push Notifications Support
Available as a paid module (GCM android module ) or one can configure through Appcelerator Cloud Service (ACS)
Available as plugins
Yes
You need to buy suitable Unity license for Native Code Plugins Support
Pros
- Titanium is not an attempt at “write once, run everywhere”. It makes effective use of familiar platform specific UI widgets.
- Native APIs and native app development are almost completely abstract to the end developer.
- Phonegap Build service allows you to get app-store ready apps without the headache of maintaining native SDKs.
- Using a single codebase, you can deploy your app to multiple platforms
- Supports multiple platforms, including Macs and PCs (not just iOS and Android)
- No annual fee required for Pro version - you just need to pay for it once.
- It is open source unlike its competitors
- Using a single C++ codebase, you can deploy your app to multiple platforms
Cons
- Apps built using Titanium are native and they can’t be reused among different platforms.
- Scope of the Titanium API makes the addition of new platforms difficult.
- The quality of the user interface in a PhoneGap application varies based on the quality of the web view and rendering engine on the platform.
- It's closed source, and you can't add native libraries and 3rd party services (working on Project Gluon, a.k.a plugins to allow their easy integration, but it has yet to be made public)
- It currently supports only iOS and Android as compared to Unity3D which also supports Macs and PCs.
- Requires an Internet connection to build (part of the build process happens on Corona Labs servers). For offline builds, you need to purchase Enterprise version.
- It's closed source (for obvious reasons). You can get the source code but it's a separate license.
- If you want to access certain specific features like in-app purchase, you’ll need to buy a plugin or create your own - it is not an in-built feature in Unity.
- Cocos2d-x relies on JNI libraries to interface with Java so C++ developers must know about it.
The cat is finally out of the bag. Apple announced some amazing new hardware and software at the WWDC 2012 keynote. There were some expected...
Have you ever noticed just how many businesses and brands are starting to pop up on the various different social media platforms and want to know if...
Choosing the right programming language is the most crucial thing for the developers in today’s time. You need to choose a language which is robust...