Save Xcode Run Script Phase after generate-xcodeproj quick batch

I have a Run Script project in my Xcode project. After I update my dependencies with SPM via swift package update

, I have to update my project with swift package generate-xcodeproj

.

Without using rubygem, pod spec, or other third part tool, how can I maintain this build phase? Is there any way to add Run Script to the xcconfig file?

+3


source to share


1 answer


With SwiftPM, currently the xcode project file is generated from the template and any extensions on it are considered ephemeral - recreating the xcode project file only considers what's in Package.swift, not any existing projects. As a result, any extensions you add (like the build phase of a shell script) are always lost when the script is regenerated.



I recommend wrapping the entire project in a Makefile or something similar if you need to invoke a shell script or equivalent mechanism for your build rather than extending the generated xcode project.

0


source







All Articles