When you export a Unity project to Xcode, Unity generated all needed thing for you, including adding all necessary frameworks and libraries, adding files should be compiled, setting up project file and some other things. When you create your new project in Xcode, and copy/paste the three folders to it, all of the things above are NOT get set. So you will have a lot of trouble in handling them. In your example, CAEAGLLayer is something related to OpenGL, and you should add OpenGLES.framework at least.
The conclusion is: DO NOT create project and copy/paste as that except you exactly know what you are doing. Otherwise it's not likely to make the project building and linking successfully. Always use the project Unity exported and modify things on it.