Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I write iOS (Cocoa) apps in JavaScript?

PhoneGap offers a nice solution for writing cross-platform apps with HTML5 and JavaScript.

But I would like to use Interface Builder for the UI, and just write all the controller code in Javascript instead of Objective-C (with of course the option to mix and match and especially call into any Objective-C libraries that I may need).

Is there a framework for this? Something akin to what CamelBones does for Perl.

The reason for wanting to do this is that the non-UI code can ideally be written in JavaScript to be reused for the web version, an possible future Android PhoneGap version, and the server-side (node.js).

like image 534
Thilo Avatar asked Jan 13 '11 00:01

Thilo


2 Answers

You could try using Appcelerator's Titanium product. It lets you write native iPhone apps in HTML+Javascript.

Check it out here. I haven't used it, but it seems like what you want.

like image 184
i_am_jorf Avatar answered Oct 21 '22 15:10

i_am_jorf


The other possibility is to use iOS Javascript Bridge to write an app in Javascript.

https://github.com/coolbloke1324/iOS-JavaScript-Bridge

like image 28
motou Avatar answered Oct 21 '22 16:10

motou