I just wanted to inform you about an issue I discovered in Swift Packages containing resources.
If an app is built with bitcode enabled and integrates an SPM 5.3 package containing at least one resource, its
BCSymbolMaps is messed up, leading to incomplete crash log symbolication.
Hope this can be helpful should you stumble on the same issue with your applications.
I was recently looking at crash logs for my apps and discovered a bunch of
_hidden entries in the stack trace:
Last Exception Backtrace: 0 CoreFoundation 0x00000001986a9344 __exceptionPreprocess + 228 1 libobjc.A.dylib 0x00000001983becc0 objc_exception_throw + 56 2 CoreFoundation 0x00000001985a6878 +[NSException raise:format:arguments:] + 96 3 Foundation 0x00000001989f8160 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 128 4 My app 0x00000001029a972c _hidden#0_ (__hidden#81_:18) 5 My app 0x00000001029ab09c _hidden#94_ (__hidden#146_:107) 6 My app 0x0000000102989f50 _hidden#1138_ (__hidden#1506_:858) 7 My app 0x0000000102989de0 _hidden#1137_ (__hidden#1506_:896) 8 My app 0x00000001029de1bc _hidden#34_ (__hidden#115_:67) 9 My app 0x0000000102941578 _hidden#55_ (__hidden#145_:110)
_hidden entries are associated with an SPM 5.3 package containing resources. If the exact same package didn't contain any resources, the crash log above would be entirely symbolicated.
The fact that this production code crashes on an assertion is also unusual. I opened a dedicated thread to explain and discuss this matter separately.
I opened a dedicated radar. There is sadly no workaround, I am afraid.