iOS / Android cross platform development [closed]
Asked Answered
D

9

114

I've been playing around with developing Android apps in Java for a while and am starting to get a handle on it. However if I want to on start on an iOS version I need to code everything from scratch - which is, well, undesirable.

I was wondering on what cross platform solutions there are available and how well they work in practice. I've been thinking about web applications - perhaps using jQuery Mobile or Titanium, or Adobe Flash/Flex/Air. I also don't yet have a Mac, which I'll probably have to invest in.

So my Questions :

  1. What cross-platform development environments exist for iOS / Android (and/or other devices)?

  2. What has your experience been with these tools? (this is what I'm really keen to know)

Decennium answered 29/5, 2011 at 23:32 Comment(5)
Alister, you're certainly not the first person to ask this kind of question, nor are you the first person who wants an answer! :) Don't forget PhoneGap, which I've hear mixed reviews of, and Red Foundry, which is more cookie cutter but looks good - not cross platform yet.Firewater
You can go with PhoneGap as well. I have used it and advice you to go for it. There is a provision to generate an exe file (IPA for iOS) using application developed on PhoneGap in Android.Daiquiri
I want to give an update to this question as it's now end 2016 and the cross-platform tool landscape has changed. I'd say it depends on your programming language of choice and where your team has most xp with: 1. JavaScript: Phonegap Performance is bad on mobile, thus using tools with native components but JS for the application logic is recommended. Options are V-Play (v-play.net/apps) or React (reactnative.com). 2. C#: Xamarin is your friend. 3. C++: Use a C++ framework like Qt (qt.io) Disclaimer: I'm one of the guys behind V-Play, which is based on Qt.Amberly
Answer: Flutter, it's Google’s new mobile UI framework for crafting native interfaces on iOS and Android in record time.Poseur
There is also a promising active haxe.org project.Verdha
F
104

Disclaimer: I work for a company, Particle Code, that makes a cross-platform framework. There are a ton of companies in this space. New ones seem to spring up every week. Good news for you: you have a lot of choices.

These frameworks take different approaches, and many of them are fundamentally designed to solve different problems. Some are focused on games, some are focused on apps. I would ask the following questions:

What do you want to write? Enterprise application, personal productivity application, puzzle game, first-person shooter?

What kind of development environment do you prefer? IDE or plain ol' text editor?

Do you have strong feelings about programming languages? Of the frameworks I'm familiar with, you can choose from ActionScript, C++, C#, Java, Lua, and Ruby.

My company is more in the game space, so I haven't played as much with the JavaScript+CSS frameworks like Titanium, PhoneGap, and Sencha. But I can tell you a bit about some of the games-oriented frameworks. Games and rich internet applications are an area where cross-platform frameworks can shine, because these applications tend to place more importance of being visually unique and less on blending in with native UIs. Here are a few frameworks to look for:

  • Unity www.unity3d.com is a 3D games engine. It's really unlike any other development environment I've worked in. You build scenes with 3D models, and define behavior by attaching scripts to objects. You can script in JavaScript, C#, or Boo. If you want to write a 3D physics-based game that will run on iOS, Android, Windows, OS X, or consoles, this is probably the tool for you. You can also write 2D games using 3D assets--a fine example of this is indie game Max and the Magic Marker, a 2D physics-based side-scroller written in Unity. If you don't know it, I recommend checking it out (especially if there are any kids in your household). Max is available for PC, Wii, iOS and Windows Phone 7 (although the latter version is a port, since Unity doesn't support WinPhone). Unity comes with some sample games complete with 3D assets and textures, which really helps getting up to speed with what can be a pretty complicated environment.

  • Corona www.anscamobile.com/corona is a 2D games engine that uses the Lua scripting language and supports iOS and Android. The selling point of Corona is the ability to write physics-based games very quickly in few lines of code, and the large number of Corona-based games in the iOS app store is a testament to its success. The environment is very lean, which will appeal to some people. It comes with a simulator and debugger. You add your text editor of choice, and you have a development environment. The base SDK doesn't include any UI components, like buttons or list boxes, but a CoronaUI add-on is available to subscribers.

  • The Particle SDK www.particlecode.com is a slightly more general cross-platform solution with a background in games. You can write in either Java or ActionScript, using a MVC application model. It includes an Eclipse-based IDE with a WYSIWYG UI editor. We currently support building for Android, iOS, webOS, and Windows Phone 7 devices. You can also output Flash or HTML5 for the web. The framework was originally developed for online multiplayer social games, such as poker and backgammon, and it suits 2D games and apps with complex logic. The framework supports 2D graphics and includes a 2D physics engine.

NB:

Today we announced that Particle Code has been acquired by Appcelerator, makers of the Titanium cross-platform framework.

...

As of January 1, 2012, [Particle Code] will no longer officially support the [Particle SDK] platform.

Source

  • The Airplay SDK www.madewithmarmalade.com is a C++ framework that lets you develop in either Visual Studio or Xcode. It supports both 2D and 3D graphics. Airplay targets iOS, Android, Bada, Symbian, webOS, and Windows Mobile 6. They also have an add-on to build AirPlay apps for PSP. My C++ being very rusty, I haven't played with it much, but it looks cool.

In terms of learning curve, I'd say that Unity had the steepest learning curve (for me), Corona was the simplest, and Particle and Airplay are somewhere in between.

Another interesting point is how the frameworks handle different form factors. Corona supports dynamic scaling, which will be familiar to Flash developers. This is very easy to use but means that you end up wasting screen space when going from a 4:3 screen like the iPhone to a 16:9 like the new qHD Android devices. The Particle SDK's UI editor lets you design flexible layouts that scale, but also lets you adjust the layouts for individual screen sizes. This takes a little more time but lets you make the app look custom made for each screen.

Of course, what works for you depends on your individual taste and work style as well as your goals -- so I recommend downloading a couple of these tools and giving them a shot. All of these tools are free to try.

Also, if I could just put in a public service announcement -- most of these tools are in really active development. If you find a framework you like, by all means send feedback and let them know what you like, what you don't like, and features you'd like to see. You have a real opportunity to influence what goes into the next versions of these tools.

Frogman answered 15/6, 2011 at 19:24 Comment(3)
I was thinking more enterprise development, but you may have inspired me to look into one of these SDKs for fun.Decennium
links to each framework would be usefulGapeworm
Update: Particle Code was acquired by Appcelerator, makers of Titanium, so the fate of the Particle SDK is uncertain. Airplay changed its name, rather inexplicably, to "Marmalade."Frogman
U
15

MonoTouch and MonoDroid but what will happen to that part of Attachmate now is anybody's guess. Of course even with the mono solutions you're still creating non cross platform views but the idea being the reuse of business logic.

Keep an eye on http://www.xamarin.com/ it will be interesting to see what they come up with.

Underachieve answered 30/5, 2011 at 1:18 Comment(0)
T
12

My experience with making something very simple in PhoneGap+jQuery Mobile was fine. I was able to do it quickly for iOS. However, it didn't work on my Android phones without making some changes. The project was a very simple app to take pictures and post them to a web site. And at the end of the day it felt "clunky" compared to a true native app.

I don't believe there will ever be easy cross platform development. I think the browser is as close as you will get. By choosing something like PhoneGap I think you are just trading one set of pain points for a different set of pain points.

Tc answered 30/5, 2011 at 2:5 Comment(0)
T
7

In case you do not want to use a full-fledged framework for cross-platform development, take a look at C++ as an option. iOS fully supports using C++ for your application logic via Objective-C++. I don't know how well Android's support for C++ via the NDK is suited for doing your business logic in C++ rather than just some performance-critical code snippets, but in case that use case is well supported, you could give it a try.

This approach of course only makes sense if your application logic constitutes the greatest part of your project, as the user interfaces will have to be written individually for each platform.

As a matter of fact, C++ is the single most widely supported programming language (with the exception of C), and is therefore the core language of most large cross-platform applications.

Trapezohedron answered 24/11, 2011 at 17:8 Comment(2)
Btw, Android actually seems to directly support activities written in C++ only: developer.android.com/reference/android/app/NativeActivity.htmlTrapezohedron
With one caveat - no Java access (so no 3rd party library integration or SDK access) from NativeActivity. Makes it unsuitable for many purposes.Starkey
N
6

Although I've just begun looking at this area of development, I think it comes down to this basic difference: some tools retain the original code, and some port to native...

for instance, PhoneGap just keeps the HTML/CSS/JS code that you write, and wraps it in sufficient iOS code to qualify as an app, whereas Appcelerator delivers you an XCode project...so if you're not familiar with iOS, then that wouldn't really provide any benefit to you over PhoneGap, but if you DO know a bit, that might give you just a bit more ability to tweak the native versions after your larger coding effort.

I haven't used appcelerator myself, but worked on a project a couple weeks ago where one of our team members made an entire iPad app in about 24 hours using it.

And yes, to actually submit to apple, you'll have to get a mac, but if that's not your primary work platform you can go cheap.

Newmodel answered 30/5, 2011 at 0:47 Comment(0)
P
3

Cappuccino or PhoneGap.

Sometimes though trying to find a shortcut does not save you time or give you a comparable end product.

Petulance answered 30/5, 2011 at 1:23 Comment(0)
D
3

If you've ever used LUA, you might try Corona SDK can create apps that run on IOS and Android

https://coronalabs.com/

I've downloaded it and messed around some, I find LUA a very easy to learn scripting language without the usual scripting language hassles/limitations....

Distinctive answered 10/6, 2011 at 14:16 Comment(0)
M
3

There's also MoSync Mobile SDK

GPL and commercial licensing. There's a good overview of their approach here.

Madancy answered 21/12, 2011 at 5:29 Comment(0)
R
2

There is also BatteryTech which we've been using for the past 18 months and have released several games off of it. http://www.batterypoweredgames.com/batterytech

All C++, Android and iOS support, all users get full source. The new v2 includes lua bindings.

Renitarenitent answered 2/5, 2012 at 17:58 Comment(1)
As of 5/30/12: $200 for license for 5 or fewer developers. $800 for more than 5. Cannot be used for open source projects.Madancy

© 2022 - 2024 — McMap. All rights reserved.