My self-paced java courses have been going so well that I thought I would take on another programming language simultanesouly. I signed up first for the Mac iOS 5 Developer program and downloaded the Xcode version 4.2.
Next, I purchased another “…for Dummies” book, this one is titled “Objective-C for Dummies.” The first chapter of the book describes how to start a new project.
Since the book was referencing so many programs built from the Mac OS SDK, I immediately signed up (paid $99) to become a member of the Mac OS SDK as well. I’m not sure that I have the correct access to this area of the Mac Develop Member Center to download the actual SDK software needed for the Mac OS X portion and not just iOS.
As I read through the first chapters of the book and create a new project, the book references different files I should see in the project. The book references a .m file and a .pch file. I don’ t see either of these files when I start a new project. The file I do see is a main.c file and it contains most of the code that my “…for Dummies” book references.
The lesson continues to explain the header files contained in the .m file. I see header files in my main.c, but not the header file they are referencing <Foundation/Foundation.h> The remaining code that is discussed in the project is all found in the file main.c in the new project I created.
I continued following the lesson and I was able to modify the code that was in the main.c file as opposed to what the book discussed removing / adding to the .m file.
The book references the NSLog command that is used by first calling upon the line:
#import <Foundation/Foundation.h>
The main.c file that is created instead calls upon the header file:
#include <stdio.h>
Therefore, it uses the printf(“”) command.
So, I’ve made the program work the way it was supposed to, but I’m getting nervous. The “…for Dummies” book I am using references an older version of Xcode and an older version of the Mac OS SDK. I can’t tell if I have the actual Mac OS X SDK info loaded into Xcode yet, and I’m hoping I’m not going to have to constantly translate and figure out how to make these programs work with different header files.
Anyone else out there having Xcode template file confusion?