nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Build phase - swiftformat not able to view .swiftformat on test target #1669

Closed evliu closed 2 months ago

evliu commented 2 months ago

Hi, does anyone have any insight into why the build phase script works on the main build target for my iOS app project but not in the test and uitest targets? I can add it to Input Files, but then I would also need to add every single swift file also. I'm sure it's just a setting but I can't figure it out after hours on google and copilot. Thanks in advance!

Screenshot 2024-04-10 at 9 15 23 PM
nicklockwood commented 2 months ago

Could it be that you need to set ENABLE_USER_SCRIPT_SANDBOXING=NO?

evliu commented 2 months ago

Could it be that you need to set ENABLE_USER_SCRIPT_SANDBOXING=NO?

Thank you so much 😭 I had it set on the main target but totally forgot about it after the fact!!!!! ripping out my hair! sorry for the trouble!