Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically Clean a target before building in XCode

I try to automate my UI testing (using FoneMonkey ). I have several targets, linked to different frameworks. The issue is that I have to clean my targets before building them. If not, it looks like it loads unwanted frameworks (and thus has unexpected behavior). So I'd like to know if there is a way to auto-clean the target(s) before building, by setting an option, using a run script...

I tried using

xcodebuild clean

But I get an

ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1763/pbxcore/Target.subproj/PBXTarget.m:597

Any idea ?

Thanks

like image 319
Julien Avatar asked Apr 18 '26 03:04

Julien


1 Answers

You can force the top level project to rebuild from scratch by removing the build directory. e.g. rm -rf build. This may be sufficient for your needs.

Otherwise, upgrade to the latest version of XCode, and failing that, submit a bug report.

like image 170
freespace Avatar answered Apr 20 '26 17:04

freespace



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!