Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run code snippets in Objective-C

Tags:

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?

like image 425
BrainLikeADullPencil Avatar asked Jan 30 '26 20:01

BrainLikeADullPencil


1 Answers

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.

like image 86
Nikolai Ruhe Avatar answered Feb 01 '26 16:02

Nikolai Ruhe