cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

iOS FileUtils::fullPathForDirectory return empty

Open Chuanqi927 opened this issue 3 years ago • 1 comments

  • 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:

  1. create new folders under Resource folder and put some resource files inside it.
  2. use cocos2d::FileUtils::getInstance()->listFiles(dirname); to get files inside a directory.
image

Chuanqi927 avatar May 09 '22 09:05 Chuanqi927

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.

stevetranby avatar Jun 11 '22 04:06 stevetranby