禁止Xcode项目中的所有警告选项在构建时不会隐藏警告

Mik*_*ael 11 xcode compilation ios cocoapods

  1. Cocoapods inhibit_all_warnings!没有将Pods项目"禁止所有警告"设置为"是"

  2. 在设置Pod项目和单个窗格"禁止所有警告"选项为"是"后,Xcode仍显示窗格警告

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
Run Code Online (Sandbox Code Playgroud)

Der*_*gic -1

我从来不知道如何制作cocoapods的inhibit_all_warnings!工作,但有一个选项可以在 Xcode 的问题导航器中隐藏警告。

1)转到左侧面板上的问题导航器(!三角形符号)

2) 在底部搜索栏右侧单击!八边形中的符号

不幸的是,它会在您的项目中隐藏警告,但至少您可以专注于您的错误。