cocos2d-x
cocos2d-x copied to clipboard
iOS FileUtils::fullPathForDirectory return empty
- cocos2d-x version: 3.17.2
- devices test on: iPhone XR (iOS 14.6)
- developing environments
- NDK version: NA
- Xcode version: 13.2.1
- VS version: NA
- browser type and version: NA
Steps to Reproduce:
- create new folders under Resource folder and put some resource files inside it.
- use
cocos2d::FileUtils::getInstance()->listFiles(dirname);to get files inside a directory.
If you haven't found a solution yet, you probably need to check that the fonts folder is in the iOS target's project's settings: BuildPhases > Copy Bundle Resources. You could also select the fonts folder in the project navigator and then "View > Inspectors > Show Inspector" (or use key combo: CMD+OPT+0) to confirm that both iOS and Mac targets are selected for the folder's membership.