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

How to set up an Obj C prg. like the video...I stepped through the Xcode options for obj C and my set up is different...

again...from where the video starts in Xcode and file set up...maybe it is my version of Xcode, but from the UI selection options my files did not set up the same nor when I opened mine did the NS log info. appear...want to make sure I have the correct files and that they are organized the same before going forward. What is the best way to set up Obj C video to mirror the teaching video?

2 Answers

Hi Tera, In Xcode if you are setting up to run Obj-C, select Command Line Tool in the Application section of OSX (it should be the first window that pops up when you create a new project). Then after you name it, the change the dropdown section for "Type" from "C" to "Foundation".
Once your done setting up the the project, if you click on main.m in the navigator on the left, you should see the NSLog(); under the comments in the main function.

That should solve the problem.

Thanks for the response. That way did bring up the NSLog(); script however, the file did not show #import <Cocoa/Cocoa.h>. I am still learning, however, I think that having that #import header is more important. I opened just about every file you could in Xcode and the file that opened with with <Cocoa/Cocoa.h> was Cocoa Application under OS X. I then deleted and changed the body that automatically showed up in the file to match the video. I am going to go with what I created and see if I end up with the same results as the video at the end of the video. :)