Xcode: how can I run custom build phases only if any Swift file is changed?

Viewed 13

I'd like to run swiftlint automatically during build but only if any .swift file has been changed. I tried to specify

$(SRCROOT)/**.swift

for "Input Files" but it complains that the phase "will be run during every build because it does not specify any outputs". When I specify the same for "Output Files" the warning goes away but the phase is never run.

0 Answers
Related