Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Introduction to Objective-C From Structs to Objects

Don Almeida
PLUS
Don Almeida
Courses Plus Student 2,479 Points

XCode Template to start writing code from scratch.

I downloaded the source code and tried modifying it to complete the exercise. it worked well. now i would like to start from scratch. what template should I choose from XCode? The options available are iOS application or OSX application. under OSX there is Cocoa Application with ObjectiveC. Doing this adds many other files. Where should I start with with minimum required files to write objectivC code. Thank you,

1 Answer

Stone Preston
Stone Preston
42,016 Points

using any of the templates provided in xcode will set you up for creating an actual iOS/OS X app. If all you want to do is play around with writing some objective C i would probably just use the project templates provided with the course. These are about as minimal as it gets and it wont add a bunch of confusing files like the templates will. make sure you open the my first objective c program project, and not the c one.

Don Almeida
Don Almeida
Courses Plus Student 2,479 Points

Okay Thanks. I started of with OSX Cocoa application.. deleted few unwanted files.. kept the frameworks and the main.m file and then added sphere.h and sphere.m. modified the main.m and it all worked. Thanks, for your help Stone.