Xcode does not generate DYSM for SPM dependencies
Asked Answered
M

1

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.

Misplay answered 13/10, 2020 at 22:11 Comment(7)
Any update on this?Shrunken
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.Misplay
Anyone figured this out?Edgeworth
I'm also stuck on this problem, any updates here?Unthread
May be its static lib, so no dysm needed. #50604749Kerseymere
have you tested testflight to get dSYM from? also check this solution #67441566Ali
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.Misplay
C
1

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.

Colenecoleopteran answered 15/9, 2022 at 7:11 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.