Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a simple Objective-C command line project in Xcode

I'm moving from a C# VS2008 world into the Mac world and I just wanted to know how I can create a quick little command line based application so that I can write many little Objective-C apps without worrying about creating an iPhone app or whatever.

Which projects do I create in Xcode? I can see the Command Line Tool under "Mac OS X" but the only options for the type is "C", "C++", "Core Data", "Core Foundation", "Core Services" and "Foundation" but no simple Objective-C project ?

Thanks

like image 617
Mark Avatar asked Apr 23 '10 10:04

Mark


People also ask

How do I create an Objective-C project in Xcode?

Create a ProjectLaunch Xcode, then click “Create a new Xcode project” in the Welcome to Xcode window or choose File > New > Project. In the sheet that appears, select the target operating system or platform and a template under Application.

What is Objective-C in Xcode?

Objective-C is the primary programming language you use when writing software for OS X and iOS. It's a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime.

How do I run a command line in Xcode?

go to the 'Info' tab and in a menu 'Executable' choose 'Other...' in file window go to search input field and type 'terminal' and click on its icon when you find it. Now you should see 'Terminal. app' in 'Executable' field.


1 Answers

"Foundation" is the one you want. The Foundation framework is Apple's "standard library" for Objective-C that provides all the basic classes like NSArray, NSString, NSNumber, and much more. Since "plain" Objective-C without Foundation is not very useful for most applications, Apple probably chose to name its project template after the Foundation library.

like image 59
Ole Begemann Avatar answered Sep 21 '22 13:09

Ole Begemann