With all the SDKs floating around, it’s handy to be able to build for multiple SDKs and platforms. However, bouncing from 3.2 to 3.0 and even occasionally 2.x, I frequently get deprecated warnings involving methods that have changed or been superseded:
warning: 'UIKeyboardBoundsUserInfoKey' is deprecated.
Since I still want to maintain compatibility with older OSes, and I’m also striving to remove ‘noise’ when building, is there a way to turn off or disable these warnings?
Try
-Wno-deprecated-declarations, or its corresponding setting in Xcode,GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS(pro tip: just type in “deprecated” in the build settings to find the specific setting for this warning).Current versions of Xcode (e.g. Xcode 9.2):
Ancient versions of Xcode (e.g. Xcode 2.x, 3.x):