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 01-02-2012, 04:16 PM   #1 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 35
Kenenth is on a distinguished road
Default Integrating cocos2d into UIKit?

I have already written an iPhone app, but i have decided to rewrite it using cocos2d. Although, I do not want to completely rewrite the entire app, I just want to use it for one view due to heavy graphics. I only want to use a few commands - Is this possible? And if so, how can I get cocos2d to interact with UIKit objects that I have already set up?
Thanks.

Last edited by Kenenth; 01-02-2012 at 04:20 PM.
Kenenth is offline   Reply With Quote
Old 01-02-2012, 04:27 PM   #2 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Get started with my YouTube video tutorial: Xcode Tutorial 16 - Cocos2D in a UIKit app - YouTube
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 01-02-2012, 04:33 PM   #3 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 35
Kenenth is on a distinguished road
Default

Quote:
Originally Posted by Objective Zero View Post
Get started with my YouTube video tutorial: Xcode Tutorial 16 - Cocos2D in a UIKit app - YouTube
Haha thats actually where I got started. But, when I imported the cocos2d folder and build and ran, I got 8 errors. All of them said something in quotes followed by "referenced from: _inflateMemory in ZipUtils.o". Struggled with that for a while then gave up. Any ideas as how to fix it?
Kenenth is offline   Reply With Quote
Old 01-02-2012, 04:44 PM   #4 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Quote:
Originally Posted by Kenenth View Post
Haha thats actually where I got started. But, when I imported the cocos2d folder and build and ran, I got 8 errors. All of them said something in quotes followed by "referenced from: _inflateMemory in ZipUtils.o". Struggled with that for a while then gave up. Any ideas as how to fix it?
Did you make sure to set the -lz flag exact how I entered it? Also did you add Open GL ES and import it?
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 01-02-2012, 04:56 PM   #5 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 35
Kenenth is on a distinguished road
Default

Yes, I did them both and just double checked them.
Kenenth is offline   Reply With Quote
Old 01-02-2012, 05:10 PM   #6 (permalink)
Registered Member
 
Objective Zero's Avatar
 
Join Date: Oct 2010
Posts: 1,210
Objective Zero is on a distinguished road
Default

Hmm thats odd. I would recommend then completely removing the cocos2d files from the app folder and cleaning it. Then make sure you add it the same way I did.

Also, maybe you should add just plain Open GL too and see if that helps.

If none of those tips help, try this tutorial: How To Integrate Cocos2D and UIKit | Ray Wenderlich
__________________
Questions?

Check out my OCR app!
http://itunes.apple.com/app/ocr-pro/id486512712?mt=8
Objective Zero is offline   Reply With Quote
Old 01-03-2012, 09:15 PM   #7 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 35
Kenenth is on a distinguished road
Default

Quote:
Originally Posted by Objective Zero View Post
Hmm thats odd. I would recommend then completely removing the cocos2d files from the app folder and cleaning it. Then make sure you add it the same way I did.

Also, maybe you should add just plain Open GL too and see if that helps.

If none of those tips help, try this tutorial: How To Integrate Cocos2D and UIKit | Ray Wenderlich
Haha. I had looked at that prior to this. But, after a couple hours of researching, I managed to figure it out. For for future reference to anyone it may concern, I had to add in two more frameworks: QuartzCore.framework and libz.dylib. That fixed it. Thanks for all the help.
Kenenth is offline   Reply With Quote
Reply

Bookmarks

Tags
cocos 2d, game, objective-c, uikit

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: 399
11 members and 388 guests
buggen, EvilElf, guusleijsten, j.b.rajesh@gmail.com, LunarMoon, morterbaher, QuantumDoja, sacha1996, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,673
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, morterbaher
Powered by vBadvanced CMPS v3.1.0

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