Note: Anyone who can help me properly fix this completely gets the 100 point bounty!!!
In my application I am mixing UIKit with Cocos2D together, I do some simple custom view animations using addSubview and removeFromSuperview calls. I recently needed to add another CCScene to my app to get rid of some complicated UIKit code that Cocos2D can easily handle. So I have a base view in my app, it is a UIViewController with some buttons on it. Behind those buttons is a CCGLView which Cocos2D will do whatever on. That works great. Then when I want to go to my second view controller (lets call it my game view), after I do my view animations, the viewdidload gets called (thats where my director initialization is for the 2nd CCScene) and either nothing happens or I get errors like below in the console. Now in my original project the errors below are what I get, and in this sample project nothing happens. These are the errors:
OpenGL error 0x0501 in DrawSolidPolygon 104
OpenGL error 0x0502 in DrawSolidPolygon 104
OpenGL error 0x0501 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 556
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 556
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 556
OpenGL error 0x0501 in -[CCParticleSystemQuad postStep] 411
OpenGL error 0x0506 in -[CCSprite draw] 532
OpenGL error 0x0502 in -[CCParticleSystemQuad draw] 434
OpenGL error 0x0502 in -[CCSprite draw] 532
OpenGL error 0x0502 in -[CCSprite draw] 532
Now when I had one scene in my original project nothing like this happens, it only happens now that I am using 2 CCScenes. So the code in the sample project is a pretty much copy of my original project so anything wrong in there will most likely lead me to fix the issue at hand here and hopefully get rid of those OpenGL errors.
After a few more hours of testing and gathering information, it seems that my issue is similar to: iOS and multiple OpenGL views. I have also seen this link: http://gamesfromwithin.com/using-multiple-opengl-views-and-uikit. However both of these links do not make any sense to me since I do not know how to relate it to Cocos2D. I think this whole issue is a limitation of the current version of Cocos2D but if someone can download my project and somehow apply these past two links' fixes to my project and fully fix it, that would be great and would fix all of my issues!
Now the version of Cocos2D in my project is the latest available to download for the 2.0 version. If anyone would be nice enough to download the project and see what I am doing wrong I think this will solve the issue for me and others who are experiencing issues similar to mine.
The link below is a download link for the sample project with my issue: http://www.gogofile.com/Default.aspx?p=sc&ID=634818635814123750_4340
Update as of 9/3/12, I am currently thinking just to contact @riq, the main creator behind Cocos2D for iOS. However before I do so, is everyone sure there isn't a way to just have one CCGLView and I can just plop it in any UIViewController because technically I will not be using two views, it will just be one shared view between the controllers. Is this way possible?