Okay...newbie here. Don't mind a little hazing...but here's a beef with the first problem in Ch. 9 (using the Kindle edition).

I explicitly re-typed the Complex.h and .m files...based on the files given in the book. But then you ask to #import Fraction.h.

You've done so well not throwing us past the deep end so far, but failed (i THINK) to provide a major skill, which is where to copy the previously written header files so that new programs can read them. I tried copying them to the root folder and while there are no errors showing in the editor I get a nasty runtime error until I comment every instance of the Fraction parts of this program!

What's REALLY annoying is that the editor seems to recognize the methods in Fraction.h and Fraction.m, providing correct case etc. for typing them in.

If you want to copy one or more files from one project to another, the easiest way is to have both projects open in XCode and then to simply select the file or files to be copied and drag them into the appropriate place in the new project. When the dialog appears, I suggest you check "Copy items..." so that a fresh copy of the file is made in the new project's folder.

Thanks so much. Clearly, it has to go through a registration process that is represented by the dialog box when you copy them that way.

Do you think - for the next person like me that comes along with this - you could print something about this process in the next edition? Thanks again. It seems so intuitive, but the requirement to have it copied to the project window rather than outside Xcode eluded me.

It would SEEM possible to use the Finder to move the files. They're only text files after all...right?

Here's the process I tried to follow: search for, say, Fraction.h and copy it into the folder of the new exercise. All seems well, and the compiler/editor recognizes the work, makes all the colors pretty and generates no errors...until runtime! then OOPS!!!!!

Same holds for using the Finder and then placing the headers into the project in Xcode...the dialog box asking how to handle the files comes up, and it seems all is well, again until runtime, when the build fails with error messages this newbie sees as from the bowels of Hell.

The process you mentioned, having both projects open and copying the files from one project into the other, is the ONLY way they work. There's obviously some kind of glue that binds these files into a project and that's the ONLY way it works.

This is all well and good, but where are we supposed to find this out in the documentation? I really appreciate your telling me how to do it, but in order to solve the next issue like this and then next...how would I have found out this if I didn't have an author as dedicated as Steve is to come back and work with us as we suffer through these exercises? In other words, grateful for the fish...but would like the fishing LESSON as well.

"It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other....Git addresses this issue using submodules. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate."

Of course it's not that simple. the article goes on, discussing such things as having a "detached HEAD," or working with "Subtree Merging" as an alternative to using submodules.

Searching for how to accomplish this with Xcode 4, I found this:

http://www.cocoanetics.com/2011/03/git-submodules-and-xcode-4/

"Previously when integrating existing library code with new projects I would have simply copied the necessary groups from from Xcode project to another. Then I would choose to copy the files to the new project to be sure that they got included in the source tree. Otherwise the project would not build for other people accessing the same source control management (SCM) server.Now with Xcode 4 this technique no longer works. You simply cannot drag groups between workspaces. "

The post continues with a step by step procedure to add a submodule with git and integrate that with Xcode.I'm going to try it out and I'll return with my thoughts.

I eventually was able to add .h and .m files to my project, without clicking on the "Copy items into destination group's folder (if needed)" when adding the files. Therefore the files stayed at the original location and I just referenced them inside the project.

In order to include them, I could not figure out a good way to do it except for including the full path, such as this:

I am sure there are better ways to do this, but I do not know how yet. For the time being, I like this approach, because it allows me to keep classes that this book keeps adding on to and re-using in one location, and I can use the code across all of the projects.