How to clean project before each build?

前端 未结 2 2089
滥情空心
滥情空心 2020-12-09 20:48

Is there a way (possibly using schemes) in Xcode to specify that a clean is automatically done before doing a new build.?

I have a project that sometimes fails to bu

2条回答
  •  时光说笑
    2020-12-09 21:01

    The selected answer did not work for me, it caused my build to fail (Xcode 4.6.3) when trying to run on the simulator.
    Based on Jano's answer and on this link in the Pre-action script instead of writing

    rm -rf ${BUILT_PRODUCTS_DIR}  
    

    I wrote

    touch ${BUILT_PRODUCTS_DIR}
    

    This should have the same effect and it doesn't cause my build to fail

提交回复
热议问题