I am getting the following error whenever I try to install my Cocos2d game on an iPhone device.
Failed to get the task for process 1640
I am using xCode 4.0
Make sure you are using a debug configuration and not a release or ad hoc configuration to deploy to the device.
Go to the Build select box at the upper left of the Xcode main window. Select the "Scheme" that isn't building and select Edit Scheme.
In the next dialog select Run on the left hand side and Info on the right. Make sure Build Configuration is set to Debug.