What’s the issue?
I use reference folder(blue folder) to add lua code in XCode.
change lua code, then run this target
But the build can’t overwrite old lua file
So I delete the app in device every runtime
How can I run it,and it will overwrite old lua file automatically?
What’s the engine version?
cocos2dx lua
How to reproduce it?
change lua code, then run it
It was a bug about xcode5,you can do as follow:
1.Add New Run Script Build Phase
2.Move the new phase to the second place
3.Add the following run script
_TARGET_BUILD_CONTENTS_PATH=$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH
echo TARGET_BUILD_DIR: $TARGET_BUILD_DIR
echo CONTENTS_FOLDER_PATH: $CONTENTS_FOLDER_PATH
echo _TARGET_BUILD_CONTENTS_PATH: $_TARGET_BUILD_CONTENTS_PATH
echo PWD: $PWD
echo Cleaning $_TARGET_BUILD_CONTENTS_PATH/
rm -rf $TARGET_BUILD_DIR/lua-tests\ iOS.app/res/*
rm -rf $TARGET_BUILD_DIR/lua-tests\ iOS.app/src/*
mkdir -p $TARGET_BUILD_DIR/lua-tests\ iOS.app/res/
mkdir -p $TARGET_BUILD_DIR/lua-tests\ iOS.app/src/
cp -R $PWD/../tests/lua-tests/res/* $TARGET_BUILD_DIR/lua-tests\ iOS.app/res/
cp -R $PWD/../tests/lua-tests/src/* $TARGET_BUILD_DIR/lua-tests\ iOS.app/src/
Through these steps,the changing lua code override the older immediately
And I provide another solution which I try successfully,
The shell script is below:
find ${SRCROOT}/…/…/…/src/ -name “" -exec touch -cm {} ;
find ${SRCROOT}/…/…/…/Resources/ -name "” -exec touch -cm {} ;
And thanks for samuele3hu you provide.
I think it was a good solution