Check the following:
In the Xcode, on the Project window watch the leftmost and upper clicking window. It should show Simulator-4.2, Debug, Project Name. If it show Missing SDK is because when you open the Project from the book downloaded file it does not identify the SDK Version.
You should go to Xcode menu bar and select Project>Edit Project Settings and choose Base SDK to 4.2 if this is the version you are using. Save the changes an make Build and Run. If the problem persists, close Xcode (it ask to save ALL the changes) click OK, open the project again and you should be done.