【发布时间】:2016-04-23 08:03:17
【问题描述】:
Cocoapods 禁止所有警告!没有将 Pods 项目“禁止所有警告”设置为“是”
将 Pod 项目和单个 pod 的“禁止所有警告”选项设置为“是”后,Xcode 仍然显示 pod 警告
Cocoapods 版本:0.39.0 Xcode 版本:7.2
我的豆荚在这里:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
# ignore all warnings from all pods
inhibit_all_warnings!
pod 'SnapKit', '~> 0.15.0'
pod 'Crashlytics'
pod 'YLGIFImage'
pod 'Fabric'
pod "AFNetworking", "~> 2.0"
pod 'SDWebImage', '~>3.7'
# Changes build active architecture only
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
【问题讨论】:
-
正如 Vizllx 所说,请检查他的链接并尝试使用
:inhibit_warnings => true或:inhibit_dependency_warnings => true -
我也试过了,但是无论我尝试什么,XCode 中的抑制警告选项都没有改变。我猜它还没有工作
-
如果您使用的是 Xcode 8 或更高版本,则存在与警告是否出现在头文件中相关的错误。更多信息:github.com/CocoaPods/CocoaPods/pull/6401
标签: ios xcode compilation cocoapods