Toggle the build phase of a startup script in Xcode

I have a build script build phase that I added to the Xcode project.

I want to be able to enable this startup script when I want it to start and shut down when I do not.

Is this possible in Xcode, and if so, how can this be done?

+6
source share
1 answer

I used to write exit in the first line to toggle the script and #exit , as shown below:

Disable the script, for example. SwiftLint:

 exit if which swiftlint >/dev/null; then swiftlint else echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" fi 

Include:

 #exit if which swiftlint >/dev/null; then swiftlint else echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" fi 

You just need to change 1 character, regardless of whether the output is complete or not.

+1
source

Source: https://habr.com/ru/post/978477/


All Articles