How to clean project before each build?

前端 未结 2 2099
滥情空心
滥情空心 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:00

    Press ⌥⌘R, expand the selected scheme, select Pre-actions, click +, select New Run Script Action, set Provide Build Settings from to your target. In the box below type rm -rf ${BUILT_PRODUCTS_DIR}. Note: it is BUILT not BUILD as seen in the Xcode dialog. You can type echo ${BUILT_PRODUCTS_DIR} > ~/Desktop/log.txt to see what's going to be deleted.

提交回复
热议问题