简体   繁体   中英

Xcode Don't Display Warnings From CocoaPods Pods

When building my project I have a lot of warnings from CocoaPods Pods. So other projects that I don't have control of.

What is the suggested way to handle this? I'd prefer to have Xcode only display warnings related to my project. It just gets to be too much if it displays warnings related to projects I don't have control over.

There is two way to get it done:

Method 1

  1. Go to your pod project's Build Settings tab
  2. Search for inhibit_all_warnings flag
  3. Set it to YES

It'll suppress all the warning related to the pod project. But when you do next pod install the flag will be reset to NO .

禁止所有警告

Method 2

In your podfile specify inhibit_all_warnings! key like following: (This will avoid the inhibit warning flag resetting with each pod install issue. Do a pod install after adding this flag.).

platform :ios, '9.0'
inhibit_all_warnings!

target 'MyApp' do
   # Your Pods
end

Reference: Podfile Syntax

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM