Silencing warnings for outdated CocoaPods dependencies

Block implicitly retains ‘self’; explicitly mention ‘self’ to indicate this is intended behavior
This block declaration is not a prototype
‘UIApplicationOpenURLOptionsSourceApplicationKey’ is only available on iOS 9.0 or newer

Tired of seeing these warnings all the time? Tired of waiting months or maybe years for the authors to fix them? Do you just want to silence them but don’t know how? Worry no more, CocoaPods is here for the rescue 🚀


Xcode can sometimes show false warnings like in the case of “Unguarded availability”. If the code is not enclosed in an @available check then it will tell you that that API may not be available even if you use the #if __IPHONE_OS_VERSION_MAX_ALLOWED approach or others.

So in order to get rid of warnings like this, you just need to set up a post_install CocoaPods hook in which you’ll have to change the Build Settings to turn these warnings off.

Here’s an example of how you can do that for the FBSDKCoreKit and Bolts pods.