Xcode 16 warning about missing symbols of static framework

I work on an SDK, and one of the ways we distribute it is as a pre-compiled static XCFramework.

As far as I know, it’s the nature of a static framework to not contain symbols since the framework will be embedded in the final app binary, and the symbols should then be generated.

However, when testing the "Validate" function of the Xcode 16 deployment process, our users are receiving a warning that says the framework does not contain symbols.

Is my assumption about static frameworks and symbols incorrect? Could this be a bug in Xcode 16? Should we modify something in our framework to inform Xcode that symbols are not needed?

Answered by DTS Engineer in 806733022

This is a new warning in Xcode 16 where if you're missing a dSYM, Xcode lets you know in case you aren't expecting that — this is to reduce scenarios where you won't are able to fully symbolicating frames coming from your app's code in crash reports. In some cases, you may not have a dSYM, such as a closed source library from a vendor, and in those cases, the warning is safe to discard.

For those developing or using libraries that are statically linked, I was not able to reproduce this warning using either the example XCFramework attached in the bug reports noted in this thread, or by doing some simple testing with libraries that I know are popular in the iOS developer community and also statically linked. For the purposes of these tests, I'm creating a brand new Xcode project, adding the library through a Swift package, and making at least function call into the library so that it doesn't appear as dead code that can be eliminated as a release optimization. For these tests, the Xcode archive contains only the dSYM for the app, as the library code coming in from the XCFramework is merged into the main app's binary at link time, rather than it remaining as a separate dynamic library in the app, which would have a separate dSYM file. If you have a scenario with a straight forward test project set up using a statically linked library in an XCFramework that still unexpectedly gives you this warning about a missing dSYM file when uploaded, I'd like to see that project — please feel free to share a link to it so I can look at it further.

I also did some tests with some libraries popular among the iOS community that are dynamically linked and closed source (with no dSYM provided), and in those circumstances, I did receive the warning, but that warning is expected in that situation.

—Ed Ford,  DTS Engineer

As far as I know, it’s the nature of a static framework to not contain symbols since the framework will be embedded in the final app binary, and the symbols should then be generated.

The heart of a static framework is a static library, which essentially is a bag of unlinked object files. It's your choice whether or not to include symbols, but if you do, they will be part of the object files, and not a dSYM. When the final app links a static library, this information is then extracted and combined into the dSYM file for the app as if those object files were their own.

However, when testing the "Validate" function of the Xcode 16 deployment process, our users are receiving a warning that says the framework does not contain symbols.

Can you be specific about the exact text in the warning message? A screenshot of the message is welcome too.

— Ed Ford,  DTS Engineer

Thanks Ford for the reply.

This is the warning:

It's your choice whether or not to include symbols

Im using xcodebuild command tool to generate the framework with MACH_O_TYPE=staticlib and GCC_GENERATE_DEBUGGING_SYMBOLS=YES but the dSYMs are not generated. Any help would be appreciated.

BTW, this warning message does not happen with Xcode 15.

This could be the sign of a mismatched dSYM with your binary. You're not expecting a binary inside the framework because you say it was linked statically...but is there a binary in the framework in a way you don't expect, sending you down this path?

To rule that out, I'd dig around inside the framework contents inside of your Xcode archive to see if there's a binary still in there. If there is, check the binary UUIDs match, as that's the identifier that ties everything together for symbolication. You can use the dwarfdump --uuid command to get it from your framework binary, and then again to the DWARF file nested inside the dSYM package. I would dig around inside the the build Xcode archive from the Organizer to locate those files for this test, rather than relying on any files in your source code base, since the Xcode Archive's contents is what the App Store sees.

If that leads to a dead end, then I suggest you study your build log to see if you can find any traces of something during the build hoisting a dSYM into the archive for this library. I personally like to export the build log and dig through it with text editor tools for filtering it down and seeing raw file paths. You might see it via a direct path reference, but beware of things like build scripts that may manipulate entire directories, which could also bring the file into the final archive without leaving a full path to the specific dSYM in the log.

—Ed Ford,  DTS Engineer

I do expect a binary inside the framework. The problem arises when someone else uses the framework in an app. Then, Xcode complains that there is a mismatched dSYM file, but our framework is a static framework and does not have a dSYM. (as you can see in the picture).

This is how I generate each framework:

xcodebuild clean build analyze -scheme "Sentry" -configuration Release -project "Sentry.xcodeproj" -sdk iphoneos MACH_O_TYPE="staticlib" GCC_GENERATE_DEBUGGING_SYMBOLS="NO"

And then I use xcodebuild -create-xcframework to combine them.

My main point is: something changed from Xcode 15 to 16 because this only happens in the 16. What changed and how to solve it?

If you can take a look at the framework, I would really appreciate it: https://github.com/getsentry/sentry-cocoa/releases/tag/8.36.0 (Sentry.xcframework.zip is the static one)

You should look inside the Xcode archive to see what the final built app looks like. By that I mean the innards of the .xcarchive in the Organizer, rather than the contents of the .xcframework package. There, I'd first validate what you see on disk inside the app's Frameworks folder, and then I'd also do the same for the dSYM folder. Since you're expecting a static framework, there shouldn't be a binary inside the frameworks folder, but you should confirm there isn't, and then also see what's in the dSYM folder.

— Ed Ford,  DTS Engineer

Same warning happens to me for the app that uses SumUp SDK when using Xcode 16 beta 6. Same static framework shows no warnings in Xcode 15. Created an issue for SumUp on github, but can it be Xcode 16 beta issue?

https://github.com/sumup/sumup-ios-sdk/issues/150

I am having this problem with run of the mill iOS app that does not use any frameworks (static or dynamic) with Xcode 16 beta 6 (actually with all releases of the 16). No such problem with Xcode 15 or priors...

@staninprague and @aurdoc, I appreciate you both sharing that you're seeing the same issue with your apps too. I'd really appreciate if everyone in this thread could open their own bug reports, and attach either the Xcode archive (.xcarchive) or .ipa files to your reports so that we can take a look at each of these. Please post the FB numbers here so that its easy for me to pick up those reports and have a look.

— Ed Ford,  DTS Engineer

submitted a FB with same 'warning's' using SPM for a SDK. attached as much info as i could FB-15144843

I see these entries on the same issue I am having. It has worked fine until Xcode 16. Has anything been resolved?

I can upload builds if you need them, but it would appear to be pretty obvious that there is a big problem with XCode16. This same project was successfully built and deployed with XCode 15 before I upgrade my Mac and XCode last night

I think it's Xcode bug. I used Transporter to upload my app, But Any "Upload Symbols Failed" warning didn't comes out.

I also get this warning when uploading a build to the App Store using Xcode 16, but not in Xcode 15.

Am using CocoaPods, and it appears to have listed every dependency.

Xcode 16 warning about missing symbols of static framework
 
 
Q