am up to Chapter 13 and I have just finished RE-building my project because of minor details I may have omitted and Id like to share with you all and perhaps get cleared up:

1. Importing folders. When importing folders into Xcode, which Ive had experience with Coreplot, Facebook, twitter apis, json libraries and more recently Box2D and Chipmunk folders, there is a difference between copying and not copying if needed. I thought I understood the difference but Im not sure now. When adding a folder to your project, you add it via the finder first and then via Xcode.

Lets take Chipmunk for example:
a. You copy your Chipmunk folder from the drive and paste it INTO your project drive folder (in Finder). i understand this only makes those files readily available to your project, but you must still tell your project “where those files really are, and that they are there for its use”.
b. So you then drag the same folder you just added to your project’s folder on your drive INTO your Xcode GROUP (inside Xcode, not Finder)
c. Sometimes you check that you INDEED WANT the items to be copied (as with Box2D & Chipmunk folders) and sometimes your DO NOT CHECK IT as with GLES-render files.

These are just 2 ways of doing the same thing, right? If you didn’t physically copy the folder in Finder, you want to CHECK the COPY ITEMS option and if you already did, you DONT want or particularly need to copy them in again, right?

However it makes a difference when you are dragging the folder, as in Coreplot, because if you drag the folder from Finder to Xcode Group folders or Finder Folders, you are actually taking the original folder, removing it from its current location and placing it in its new location.

I believe this made a big difference to me right now and I messed up my project so bad i had to rebuild the whole thing. This importing folders thing and the “copy-paste from the pdf” scheme I’ve got going which sometimes copies characters you can’t see but will give you the worst headaches hunting them down! :)

2. Missing cocos2d library from my project. At some point in the project I must have done something differently because unlike the SpaceViking Project I have, the downloaded source code has an extra target. It has a SpaceViking target and a cocos2dlibraries target which I don’t have, yet my project runs fine. Why is that? Plus what does it mean to have 2 targets? Which brings me to my next question…

3. Project vs Target settings. You can set most if not all of the same build settings for the project and for the target. They are indeed different because I believe that if you set one instead of the other, sometimes you get errors and build fails.

Leave a Reply