Then I used Xcode 15.4 to built and generated .ipa again. There are .symbols files inside Symbols folder in ipa(.zip) as before, but MyApp.xcarchive/dSYMs is also empty.
I'm surprised by this. Can you check the value of the DEBUG_INFORMATION_FORMAT
build setting, and see if it's set to DWARF with dSYM File
for your Release build. That's the standard set up for Release builds, while Debug builds default to DWARF
, so there is no dSYM file. One other thing to look at is if your Archive action in Xcode is set to use your Release configuration, or if it's set to a Debug configuration. That configuration detail is found in your scheme configuration, under Archive.
Additionally, could you also please kindly tell me why are there two kinds of files for generating crash reports? (.symbols files and dSYM file), do they have different aims?
The dSYM file contains extremely detailed information in DWARF that enables debugging your app in minute detail, thus powering the experience of everything you can do with LLDB, especially if you're a LLDB power user. To give you an idea of how much detail is in there, the specification for the DWARF 5 standard (1) is well over 400 pages long. In a large app, the dSYM file can run to be tens or even hundreds of megabytes.
The .symbols
files are only useful for crash symbolication coming from the App Store. While the dSYM file also supports this debugging task, it's just the symbol names, and so the data is significantly limited compared to the dSYM file. The App Store doesn't need the immense detail of the dSYM to symbolicate crash reports for you, so using this format instead of the full dSYM makes for a smaller app upload to the App Store.
What if there are no .symbols files in .ipa? Will it cause problems?
You won't have any functional issues with your app.
Not including symbols means you won't have the App Store symbolicate the crash reports for your app that appear in the Organizer for you. It's always been a choice for developers to not include their symbols with your app upload, and there's a checkbox to disable that during the upload or export process from the Organizer if you wish for your app's symbols to remain private to you. However, the dSYM files should still be in your Xcode archive. Without symbols included in your upload, the App Store will still deliver crash reports to you, but they will be unsymbolicated. If you don't have the dSYM files in your Xcode archive, you won't be able to locally symbolicate those unsymbolicated crash reports.
— Ed Ford, DTS Engineer
(1): See https://dwarfstd.org