Skip to Content

Cycript: Blending Objective-C and JavaScript

Cycrypt is a new project that blends Objective-C and JavaScript to make it easier to implement aspects of both together. It's going to be great for using elements that JavaScript offers when programming with Objective-C. It's similar to JSCocoa, but it's been designed to offer a more complete set of JavaScript commands. It offers a full JavaScript parser/serializer, which allows for extensive use of JavaScript coding.

If you're wondering what exactly this is, the Cycript page offers some examples of code written with Cycript. Basically, it allows you to implement full JavaScript commands, while working with Objective-C in the same project.

Cycript is dependent on the MobileSubstrate and libffi libraries, which are available in Cydia. This won't be used to develop applications in the App Store anytime soon.

If you're interested, you can download examples or releases of Cycript. It's still being worked on, but if you're developing with both Objective-C and JavaScript in a project, you should check it out.

Categories

Developer SDK

Cycrypt is a new project that blends Objective-C and JavaScript to make it easier to implement aspects of both together. It's going to be...
 

Add a Comment

*0 / 3000 Character Maximum

5 Comments

Filter by:
Frank

@Jay Freeman (saurik),

Thanks. Originally read this too fast and had Objective-J on the brain, so read it a** backwards. My bad. Sitting here now, re-reading the post, I get it now.

November 22 2009 at 2:27 PM Report abuse rate up rate down Reply
Rick

This is all well and nice, but for those of us who are really duffers out there, when are we going to see a visual basic implementation for the iPhone?

Rumor has it that NSBASIC developed an implementation of Visual Basic for the iPhone, but couldn't get it through the Apple guys because of API's. Is this something that will be on the horizon for the future?

I have so many apps in mind for this device, but I don't want to spend a truck load of money getting a developer to do it or lose control of the whole process. I simply do not have the time to sit and learn Objective - C. Believe me I've tried.

Surely this will be something that is around the corner.

/

November 18 2009 at 5:01 PM Report abuse rate up rate down Reply
1 reply to Rick's comment
drunknbass

this is not like that.. at least thats not what people who are using it currently use it for.. this is similar to jscocoa.

right now its used to attach itself to a running process via command line to alter a live app while its running... hooking into functions.. controlling objects etc.
its its pretty damn cool

November 18 2009 at 9:09 PM Report abuse rate up rate down Reply
Frank

What exactly does this bring to the table that's unique/different/better than what already exists? How would you compare this to other implementations?

There is already a very nice implementation by the folks at 280North.com called Objective-J with a corresponding API Framework called Cappuccino that mirrors the Objective-C and Cocoa framework experience that Mac developers are familiar with. Details here:

http://www.cappuccino.org

Toss in Atlas, which aims to bring Interface Builder-like features to this Objective-J/Cappuccino world once it's done, and anyone interested in doing things using JavaScript in the browser but with the language syntax of Objective-C and the development model of Cocoa should be in heaven. Details on Atlas here:

http://280atlas.com

And for a sample of what's possible with the Objective-J/Cappuccino toolchain, look no further than 280North's web-based take on Apple's Keynote program (think MS PowerPoint for Windows users):

http://280slides.com

Note Objective-J/Cappuccino are completely free. Atlas, currently in a paid beta, will not be.

November 18 2009 at 2:23 PM Report abuse rate up rate down Reply
1 reply to Frank's comment
Jay Freeman (saurik)

This comment doesn't make any sense.

Objective-J is an implementation of Objective-C for JavaScript. Cycript is a binding from JavaScript to Objective-C.

Objective-J is used to write applications in web browsers using Objective-C semantics and syntax. Cycript is used to write actual iPhone and Mac OS applications using Objective-C libraries from the host language of JavaScript.

The only things they have in common are that they both involve JavaScript and Objective-C, but even the specific meaning of Objective-C is different in both cases.

If you want to ask "how is this different than ", you should be talking about JSCocoa, which solves much the same need (although has different initial design decisions, as discussed on the Cycript website).

November 18 2009 at 10:32 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.