Search code examples
iosbundlecocos3dfile-not-found

File in IOS bundle is not found in the simulator


I am working on an ios 6.1 application, that uses cocos3d, i have a file that is certainly in the bundle, which is 'CC3TexturableMaterial.vsh', but at a point in time when the applications needs that file, it crashes and shows the following error:

[***ERROR***] Could not load GLSL file '/Users/macbook/Library/Application Support/iPhone Simulator/6.1/Applications/3505ADEC-C70B-490F-9011-A433D85C2D66/3D.app/CC3TexturableMaterial.vsh' because it could not be found

Which implies that the file is not in the simulator's .app. does anyone encountered a similar problem?


Solution

  • This can happen when the file isn't explicitly being copied to the bundle.

    To check this, ensure that it appears within the "Build Phases" -> "Copy Bundle Resources" section within your project's build settings. (To view the main build settings, select "Project" -> "Target" from within the left hand pane).