Hello guys,
I have been annoyed recently by the fact that I have to add the resources manually to the Mac Xcode project, and iOS Xcode project (because the project file has to be updated to include the copy bundle resources stuff…). Luckily, I have stumbled upon some project that has a very interesting solution.
The idea is mainly based on the “Run Script” field in the Build Phases of the target. What you do is add a script that simply copies all the files it finds in a directory to the app bundle. The script that I have for now is:
@
find ~~L “${SRCROOT}/Resources” ~~type f notname “.*” | xargs tI {} cp {} “${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}”@
I haven’t optimized it for cocos2d-x, yet, but that should be fairly simple to pull off.
Hope this helps reduce the painful multiplatform development process a bit by taking your head off a few steps!
— Maz