I have a piece of code which is generating lots of warnings (deprecated API)
Using clang* I could do
#pragma clang diagnostic push
#pragma clang dia
Actually, you can suppress these warnings by using @available in the enclosing logical structure (i.e. function/type).
For example, say you have some code which uses the AddressBook framework, but you're building against iOS 9.
@available(iOS, deprecated: 9.0)
func addressBookStatus() -> ABAuthorizationStatus {
return ABAddressBookGetAuthorizationStatus()
}
As of Xcode 7.0.1 this will prevent the inline warnings from being displayed.