How to set Swift flags for local packages in Xcode?

Viewed 555

I'm trying to figure out how long does the Swift compiler take to build my app every time and reduce time on type checks and functions where possible. I found many articles on the internet, explaining how to add these "Other Swift Flags" in the Build Settings of the Target to get Build Time warnings in Xcode.

-Xfrontend -warn-long-expression-type-checking=100
-Xfrontend -warn-long-function-bodies=100

One such article here, for context.

Article explaining how to set Swift flags

The problem is that Xcode shows warnings about files only in the main app. I have a number of local Swift packages in the project and I can't find a way to do the same checks on the code inside those packages.

I tried adding these Swift Flags to the Project and the Target in Xcode, but it is of no use. I can't find anywhere to specify such flags for Swift Packages.

0 Answers
Related