How to add an exec script to an xcode project

Add the exec and .swiftlint.yml files.

Scott
Oct 1, 2024

You can drag the exec file into your project. To drag a .swiftlint.yml file, however, you need to reveal it as it is a hidden file. You can reveal it by clicking on the project. shift . That will reveal hidden files. Then, you can drag it into the desired project.

If you don’t have one to drag from you can run the following terminal command when you are in your project:

touch .swiftlint.yml

Call the swiftlint.yml in a build script.

Then paste:

cd "${SRCROOT}" && ./swiftlintscott

like so

You can replace swiftlintscott with the name of your executable (exec file).

Make sure you have specific errors/warnings enabled.

You can open your .swiftlint.yml file and enable and disable errors/warnings by “commenting them out.”

--

--

No responses yet