Skip to content

Instantly share code, notes, and snippets.

@Ilesh
Forked from arturgrigor/Podfile
Last active February 11, 2020 12:55
Show Gist options
  • Save Ilesh/712f719c3b4632e8e0aad0810d3cf5d0 to your computer and use it in GitHub Desktop.
Save Ilesh/712f719c3b4632e8e0aad0810d3cf5d0 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
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['Alamofire','IQKeyboardManagerSwift','Cosmos','FacebookCore','FacebookLogin','FacebookShare','SwiftyStoreKit'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment