Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-05-2011, 09:50 PM   #1 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Question Implement Cocos2D into UIKit project?

Hey,

I know this isn't a Cocos2D forum but I think it is a rather easy and general question so I was hoping someone had an answer to this so, I need to implement Cocos2d into my already existing Xcode project. I am going to be using Cocos2d in just one of my views and that's it. Does anyone know how to implement it correctly? At this point I have downloaded the latest version, but I am not sure what to do from here.

Thanks!
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 09-05-2011, 10:16 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

It's been a while since I've looked at cocos, but you should be able to just use the attachInView: method of the CCDirector, and then go from there.
smithdale87 is offline   Reply With Quote
Old 09-05-2011, 10:17 PM   #3 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Thanks for the info, but I am currently just trying to literally find out which files to drag into my project and from where to implement Cocos2d.
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 09-06-2011, 03:15 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

iphone - 'Embed' cocos2D in UIKit app - Stack Overflow
http://www.learningiphone.com/2011/0...and-uitoolbar/

the concept is to use EAGLView (that is a View that contain cocos2d stuff).
__________________
dany_dev is offline   Reply With Quote
Old 09-06-2011, 02:02 PM   #5 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Thanks for the info dany_dev so once I download the whole cocos2d download from their site. Which files do I drag into my app? There are hundreds and I am not sure which to drag in.
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 09-06-2011, 02:32 PM   #6 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

You'll probably just need to drag the entire "cocos2d" folder into your project. This will be the folder with all of the base cocos files.
smithdale87 is offline   Reply With Quote
Old 09-07-2011, 03:55 AM   #7 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

if you want to use cocos2d, you need the entire framework
__________________
dany_dev is offline   Reply With Quote
Old 09-07-2011, 03:51 PM   #8 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

I wish they made it easier, there is like 15 different folder of all base cocos2d files and I have to drag them all from finder because of this stupid Xcode 4 thing. I wish you could just drag group among Xcode projects, I guess that is what you mean by framework @dany_dev.
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 09-07-2011, 08:08 PM   #9 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

@smithdale and @dany_dev

I downloaded the latest Cocos2d and I see a group in the Xcode project cocos2d-ios that is named cocos2d. I copied that group in (from finder) and I get FontManager.h not found in CCTexture2D.m
What other files do I need?
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 09-08-2011, 11:03 PM   #10 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Ok so I tried pretty much everything. I cleaned project, restarted Xcode, downloaded a fresh Cocos2D folder from the site. I drag the folders "cocos2d", "CocosDenshion", and "FontLabel" to my project while clicking add to destination group folder but I get a Mach-O-Linker warning or something like failed build in usr/bin.

Why am I having such a hard time with this ****?
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Reply

Bookmarks

Tags
cocos2d implementation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 380
7 members and 373 guests
apatsufas, JackReidy, jeroenkeij, Sami Gh, tim0504, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,671
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JackReidy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:50 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0