iOS 11应用提交:“符号文件过多”

Dan*_*e B 7 ios cocoapods arm64 ios11

我的目标是iOS 11,现在提交该应用程序后,我收到了一封来自Apple的电子邮件,警告为“符号文件过多”。

看起来好像CocoaPods框架已包含在不需要的架构中。

谁能显示正确的设置,以避免在iOS 11上包含不需要的框架?

G S*_*G S 5

“符号文件过多”警告告诉您,您的项目比 CocoaPods 框架具有更多的限制性约束。您的目标是 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
Run Code Online (Sandbox Code Playgroud)

显示 post_install 的 podfile 屏幕截图


小智 2

如果您将以下行放入 podfile 中,则不会收到警告:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
        end
    end
end
Run Code Online (Sandbox Code Playgroud)