Skip to content

Instantly share code, notes, and snippets.

@arturgrigor
Created September 10, 2018 09:55
Show Gist options
  • Star 44 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save arturgrigor/10d25baf362cab984fc8c1093364ccfb to your computer and use it in GitHub Desktop.
Save arturgrigor/10d25baf362cab984fc8c1093364ccfb to your computer and use it in GitHub Desktop.
Sample Podfile for silencing warnings for CocoaPods dependencies
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '%TargetName%' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for %TargetName%
# pod 'FBSDKCoreKit'
end
# Silence warnings by turning them off from the Build Settings
post_install do |installer|
installer.pods_project.targets.each do |target|
shamelist = ['FBSDKCoreKit', 'Bolts']
if shamelist.include? target.name
target.build_configurations.each do |config|
config.build_settings['CLANG_WARN_STRICT_PROTOTYPES'] = 'NO'
config.build_settings['CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF'] = 'NO'
config.build_settings['CLANG_WARN_UNGUARDED_AVAILABILITY'] = 'NO'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment