BrainLikeADullPencil
BrainLikeADullPencil

Reputation: 11653

How to run code snippets in Objective-C

While trying to learn Objective C from a book, I'd like to be able to run some code snippets like...

NSString *str = @"Hello, world!";
NSLog(@"Retain count is %d", [str retainCount]);

In Ruby I'd just put this in an snippet.rb file and run ruby snippet.rb from the terminal. JavaScript has jsfiddle.net. Is there an equally easy way to do this with objective c?

Upvotes: 3

Views: 438

Answers (1)

Nikolai Ruhe
Nikolai Ruhe

Reputation: 81858

If you're on a Mac there's the handy CodeRunner. It's $9.99 on the App Store but to me it was worth every penny.

Upvotes: 6

Related Questions