Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:36:22+00:00 2026-06-17T04:36:22+00:00

Following several online tutorials, I managed to get Cocos2D added to my Cocoa Touch

  • 0

Following several online tutorials, I managed to get Cocos2D added to my Cocoa Touch (UIKit) project. Problem is, I’m able to #import "cocos2d.h" at the top of any one of my files and my game compiles and runs fine, working just as it did before, but I don’t have access to any of the cocos classes, like CCNode, CCLayer, etc.

To give you an idea of what the app does, currently, the main menu UITableView comes up, scrolls as it should, buttons that lead to various view controllers (facebook, twitter, new game creation, store, settings, etc.) all work fine. Back buttons in each view return the user to the main menu table view. This is pretty much all it does, as of now. The idea at this point would be to pass the baton to a Cocos2D scene–where the gameplay would be–when the user taps on one of the UITableViewCell’s that represents a current match.

The process I used to add Cocos2D to my project was this:

  1. Drag and drop the cocos2d-ios.xcodeproj into my “supporting files” folder
  2. Under “Link Binary with Libraries” heading under “Build Settings” for my project, I added libcocos2d.a (which continues to show up red, even after “successfully” adding Cocos2D), libz.dylib, OpenGLES.framework, and QuartzCore.framework. They all read “required.”
  3. Under “Build Settings” for my target, set “User Header Search Paths” to “/Users/Home/Downloads/cocos2d-iphone-master-v2/**” (recursive), which is where my Cocos2D library folder is.
  4. Under “Build Settings” for my target, set “Always Search User Paths” to YES.
  5. Did the same two steps identically for my project’s “Build Settings”
  6. Went through and selected all the Cocos2D .h and .m files and set -fno-objc-arc compiler flags for all Cocos2D files, which enables the pre-ARC calls to retain, release, dealloc, etc. in the old Cocos2D files to play nice with all the post-ARC files in my project.

Also worth noting, perhaps, is that when I create a new file in my existing project “cmd + n”, the only options available to me under Cocos2D templates is the CCNode class.

Am I missing something, here? Again, to be clear, I can import the cocos2d.h file and it looks as though everything will work fine. But, when I try to define anything that starts with a “CC”, autocomplete shows nothing. Any help would be appreciated. Beating my head against the wall, here. TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:36:24+00:00Added an answer on June 17, 2026 at 4:36 am

    The autocomplete issue is most likely because of the recursive search path. Xcode has problems indexing recursive header search paths (especially if you just drop in a .xcodeproj). Change it to an absolute path, add multiple paths if the source files are spread across multiple folders.

    With Xcode 4 you shouldn’t drop in a xcodeproj to another project anymore. Use a workspace to combine multiple projects side-by-side in a single workspace. See Kobold2D for an example (or just use it if you continue to have problems, because these things are already solved in Kobold2D).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see code like the following in several books and examples online. The problem
After following several tutorials I was finally able to take my existing, non-Git-Repository XCode
I have a problem with the following situation: several commits are pushed to a
I would like to be able to do the following for several classes: var
After following several different tutorials on OpenGL shaders, I noticed they all use different
I've come across code like the following several times class Foo { private Object
I have seen the following exception case several times public SomeClass(IEnumerable<T> someValues) { if
I have several file with the following format: lat,lon,value. I would like to plot
I have following use-case: there are several assemblies decorated with ProtoContract classes and I
The following simple query takes a very long time (several minutes) to execute. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.