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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…