xcode 提交应用程序时出现“符号文件过多”警告
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34313049/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Too many symbol files" warning when submitting app
提问by YogevSitton
I submitted my app to the app store and received the following warning (not error):
我将我的应用程序提交到应用程序商店并收到以下警告(不是错误):
Too many symbol files - These symbols have no corresponding slice in any binary [XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX.symbols, XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX.symbols]
符号文件太多 - 这些符号在任何二进制文件中都没有对应的切片 [XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX.symbols, XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX.symbols]
What caused this issue? How can I fix it? Will it create issues with crash reporting to Crashlytics?
是什么导致了这个问题?我该如何解决?它会在向 Crashlytics 报告崩溃时产生问题吗?
回答by Nandiin Borjigin
Same problem occurred to me, and here is why this happening and the solution.
我也遇到了同样的问题,这就是为什么会发生这种情况以及解决方案。
Short version: Redundant dSYM files are being produced due to improper project settings. In my case, the "project" consists of one major .xcproject
and several CocoaPods projects, and the Build Setting\Valid Architectures
setting of the latter one is more extensive than the former. Thus Xcode is producing redundant dSYM files for that pod projects and Apple detected those dSYM files is useless because the main project is set to a more constrained level.
简短版本:由于项目设置不当,正在生成冗余 dSYM 文件。就我而言,“项目”由一个主要.xcproject
和几个CocoaPods项目组成,Build Setting\Valid Architectures
后者的设置比前者更广泛。因此,Xcode 正在为该 pod 项目生成冗余的 dSYM 文件,而 Apple 检测到这些 dSYM 文件是无用的,因为主项目设置为更受限制的级别。
Bunch of bullshit version:
一堆废话版本:
Go to Window
->Organizer
and select your submitting version of archive and right click
->Show in finder
to locate that .xcarchive file. Then use terminal
to navigate into the .xcarchive(it's a bundle like .app) and then to the dSYMs
directory, run dwarfdump --uuid *
to show the uuids of that dSYM files. Check whether the uuid(s) in the complaining email are in the list. The email says those dSYM files are redundant, so we should prevent producing them when building the archive.
转到Window
->Organizer
并选择您提交的存档版本,然后right click
->Show in finder
找到该 .xcarchive 文件。然后使用terminal
导航到 .xcarchive(它是一个类似于 .app 的包)然后到dSYMs
目录,运行dwarfdump --uuid *
以显示该 dSYM 文件的 uuid。检查投诉邮件中的 uuid 是否在列表中。电子邮件说那些 dSYM 文件是多余的,因此我们应该在构建存档时防止生成它们。
For me, I used AFNetworking and other 3rd party frameworks in my app, and they are added to the project(or workspace more precisely) via CocoaPods. I need to guarantee my app won't be installed on any device older than iPhone5s, so I set Valid Architectures
to arm64
only in Build Setting
of my project. In this case, I should also set Valid Architectures
same for the Pod
project targets(there may be several targets depending on how many frameworks you have added via Pods). By doing this, Pods
project won't produce the redundant dSYM files during the build process. After all the targets
are set properly, go to Product
->Archive
to re-archive. You should check the uuid(s) of dSYM files again just in case.
对我来说,我在我的应用程序中使用了 AFNetworking 和其他 3rd 方框架,它们通过 CocoaPods 添加到项目(或更准确地说是工作区)中。我需要保证我的应用程序不会安装在 iPhone5s 之前的任何设备上,所以我设置Valid Architectures
为arm64
仅在Build Setting
我的项目中。在这种情况下,我还应该Valid Architectures
为Pod
项目目标设置相同的目标(可能有多个目标,具体取决于您通过 Pod 添加了多少框架)。通过这样做,Pods
项目不会在构建过程中产生多余的 dSYM 文件。所有targets
设置正确后,转到Product
->Archive
重新存档。以防万一,您应该再次检查 dSYM 文件的 uuid。
I hope I have myself understood :)
我希望我自己理解了:)
回答by G S
Let's say you are targeting iOS 11 but your cocoapods frameworks have minimum deployment target less that iOS 11, then add this at the end of your podfile:
假设您的目标是 iOS 11,但您的 cocoapods 框架的最低部署目标低于 iOS 11,然后在您的 podfile 末尾添加以下内容:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
"Too many symbol files" warning is telling you that your project has more restrictive constraints than the cocopods frameworks.
回答by val
Crashlytics reporting will not be affected by this setting.
Crashlytics 报告不会受到此设置的影响。
回答by Robin
Disable bitcode in the build setting.
在构建设置中禁用位码。
I got similar problem and determined that enabling bitcode will produce BCSymbolMaps in the app archive. Disabling bitcode resolve the issue.
我遇到了类似的问题,并确定启用位码将在应用程序存档中生成 BCSymbolMaps。禁用位码可解决此问题。