Reputation: 12444
I literally have been pulling my hair out over this for a few days now. I am simply trying to implement Cocos2D into my UIKit app but I am not sure which files I need. I know to download it from http://www.cocos2d-iphone.org/ so I did, I open up the cocos2d-ios .xcodeproj but I have absolutely no idea which files to drag into my to properly implement it in my app.
I really need help with this!!!!
Thanks, MyApps
Upvotes: 0
Views: 639
Reputation: 145
You need to copy the entire cocos2D library into your project (all the files from the unarchived download).
You can then #import "cocos2D.h" into your view controller and assign your EAGLView (create one in the view controller if your project doesn't have one already) to cocos2D (eg: [[CCDirector sharedDirector] setOpenGLView: glView];)
I know it's a bit backward, but it might be easier to create a template cocos2D project and from there migrate your existing files to the new project (your mileage may vary depending on how complex your existing project/build is).
Upvotes: 1