Disabling a specific warning in a specific line in Xcode

For CLANG, this works:

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
  // Here I like to leave a comment to my future self to explain why I need this deprecated call
  NSString *myUDID = [[UIDevice currentDevice] uniqueIdentifier];
#pragma clang diagnostic pop

You can use it inside a method, which allows you to be very specific about the line that causes the warning you want to have ignored.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)