resource loading problem on ios

resource loading problem on ios
0.0 0



I m trying to load a lua file from resource folder on ios

everything runs fine on windows , but on ios (ipad and ipad simulator) , the file can’t be found, any ideas why ?

I added the file to the resource folder , tried at root or in a “lua/” folder and the problem is the same.

If I browse the resource folder on the simulator I can see the file.

the problem only occurs on this lua file (the file lua file I added to the project actually) , we dont have any issue with other resource (images/audio file)


I just tried to move HelloLua/Resource/hello.lua into HelloLua/Resource/lua/hello.lua, it runs successfully.

Please make sure that, when you add this lua file & folder into xcode, select “Create folder references for any added folders” instead of the default value “Create groups for any added folder”, and then the “lua” folder in xcode shows in blue instead of yellow.

At last, modify this line to make the demo to run

    string path = CCFileUtils::fullPathFromRelativePath("lua/hello.lua");


problem fixed by adding

 string path = CCFileUtils::fullPathFromRelativePath( my_path);

thanks :slight_smile: