Hello. I post this information in case it can be useful for someone using XCode 4 and does not want more than one headache. If not, don't read it and ready!. It's my last 'experience' with XCode and may be I'm wrong, or the problem is in my XCode installation, or a bug, but I prefer to share it here with you.
Working with T2 and XCode 4.2 and using the template for IOS 4 AppGameKit, have to be careful! If we create or add a new file in our XCode project, it can assign an incorrect file type.
When creating a new file (File -> New -> New File), the destination choosed as destination in the window can fail or do something unwanted. Make sure that the desired destination is highlighted also in the navigation area and not only in the window 'New File' target.
If you create or add a file to the project, be sure that
XCode has created it with the correct type examining the Inspector Window Pane -> Identity and Type -> File type. It makes funny stuffs.
I created some include files that was created as .cpp although having the correct suffix (.h) having the presentation of an include file or have been created in a format not supported by the project. So, the compiler gives a lot of compiler error messages. The same if you want to add new .cpp project files. In resume, we can have a include file interpreting the complier the file is a .cpp file, or not a Objetive-C file, etc.
The AppGameKit templates are very useful. I think it's an XCode error or is the way it works. Not an error of the template.
See you.