12

Xcode is not generating dSYM files for my three SPM dependencies.

I have tried creating a new Swift only project and including a SPM package like CocoaLumberJack and even there I am not given a dSYM for release.

I am using Xcode 12.0.1, I have looked through all kinds of build settings with no luck to force them to be generated or find where Xcode puts them if it is generating them.

GlorySaber
  • 367
  • 2
  • 12
  • Any update on this? – DoesData Jan 03 '21 at 08:53
  • 1
    No, I have not attempted it since. But nothing in the release docs seems to address this either. Its a shame as its the only problem preventing my company from moving to SPM almost exclusively. – GlorySaber Jan 06 '21 at 20:05
  • Anyone figured this out? – Cam Scen Mar 03 '21 at 17:55
  • I'm also stuck on this problem, any updates here? – rmigneco May 18 '21 at 13:18
  • May be its static lib, so no dysm needed. https://stackoverflow.com/questions/50604249/why-does-not-xcode-generate-dsym-for-static-library – ChanOnly123 Feb 17 '22 at 18:16
  • have you tested testflight to get dSYM from? also check this solution https://stackoverflow.com/questions/67441066/symbolicating-swift-package-manager-builds – Ali Momeni Feb 22 '22 at 22:27
  • Yes, I did get Dsyms from test flight. But they did not include anything specific to my SPM dependencies that I could find at the time... or that my crash symbolization and reporter service could use to give human-readable symbol information logs. Also I have macOS direct builds unrelated to the Appstore and Testflight. I thankfully have not had any crashes in my dependencies since this post and have not verified if the issue is still a problem for me. – GlorySaber May 29 '22 at 03:54

1 Answers1

2

Swift packages by default are treated as static library, that is why you don't see the embed options for them in Frameworks, Libraries, and Embedded Content section:

Swift static package

Static libraries don't require separate dSYM files are they don't have any executable. They are directly contained in consuming app executable so the static library symbols will be available in application's dSYM file. If you inspect you app's ipa you won't find the swift package module in Frameworks directory.

You can also make your swift package exposed product dynamic library by specifying library type as .dynamic:

.library(
    name: "SwiftLibrary",
    type: .dynamic,
    targets: ["SwiftLibrary"]
),

This will make your package module dynamic library and will allow you to choose embed option in XCode:

Swift dynamic package

If you make your package module dynamic and you can inspect your ipa to see this embedded in the Frameworks folder. After making your package module dynamic you separate dSYM file will be generated for it.

Soumya Mahunt
  • 2,148
  • 12
  • 30