Swift Package Manager
can be a convenient way to build swift projects, and, if you (remove the absolute toolchain @rpath it adds to your binary), you can even distribute its builds.
But SPM doesn't seem to produce .dSYM
debug symbol packages, so how can you symbolicate the crash reports?
Is there a better way than using swift package generate-xcodeproj
and then getting Xcode to create the build and dSYM
s, effectively reducing SPM to .xcodeproj
shorthand?
UPDATE
swift build -c release
seems to create adSYM
package by default. But if you suddenly decided you wanted your debug build to havedSYM
s too, then read on.You can get
dSYM
output from SPM'sswift build
, by passing-g
and-debug-info-format=dwarf
toswiftc
. To do this fromswift build
the arguments must each be escaped with-Xswiftc
:I wasn't thrilled about using Xcode to build because it turns all sub-packages into dynamically linked frameworks which felt like too big a change/yak-shave just to get a readable backtrace.