Question involving Xcode

Status
Not open for further replies.

Joel_B

Ars Praefectus
4,652
Subscriptor
LurkingOne":jul2jqos said:
I've said JS in the op, but only because that's what I make webpages in.

Main problem with using Javascript is going to be responsiveness. It's usually just about passable on an iPhone, but once you get to something like a Mac App you are going to have problems. Plus you are going to have to duplicate widget functions. Again, easy to do on a small screen, but once you get to a Mac it's going to be obvious it's not a native application.
 

Shamyl Zakariya

Ars Praefectus
3,816
Subscriptor++
You can use Appcelerator's Titanium SDK to write an app using JS and have it be built to a native app on iTunes. I did it for a client -- not because I wanted to -- but because the client needed iOS & Android and a quick turnaround, and low budget. And I didn't have time to learn Android programming from scratch.

Titanium kind of sucks.

But if you can find the sweet spot for what it's good at, it's actually really impressive how well it works.

For a little context:
Titanium is a JS binding to underlying native widgets. So your button, your text view, your slider etc are all native. You're using a JS API that looks nothing like iOS or Android, but which calls out to native underlying APIs. Performance is not bad. Titanium provides a basic cross-platform API which gives you about 90% cross-platform code, and then you can easily call out to iOS or Android bindings for platform-specific tweaks.

The problem with Titanium is the gotchas, like memory management. You'd think it would "just work", but it doesn't. You have to aggressively null objects when you're done with them, you have to be familiar with iOS and Android debugging utils to find leaks. I discovered that passing images across certain hidden boundaries on iOS caused leaks, for example.

The good news is that it does make writing native plugins relatively easy. I had to write some image manipulation plugins for iOS and Android, and it worked fine.

And the client's app has one codebase and is living in Apple and Google's stores. So there's that.
 
Status
Not open for further replies.