So the question is the subject question - I want to get rid of this warning which is pretty annoying.
Is there a way to make it silent?
Note: I use dispatch_get_current_queue() for debugging purposes only.
So the question is the subject question - I want to get rid of this warning which is pretty annoying.
Is there a way to make it silent?
Note: I use dispatch_get_current_queue() for debugging purposes only.
You could use the following code to suppress the warnings.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
dispatch_get_current_queue() // your deprecated calling code
#pragma clang diagnostic pop
You can also add -Wno-deprecated-declarations
to "Other Warnings Flags" (WARNING_CFLAGS
) to ignore all deprecation warnings.
If you have some deprecation warnings in Objective-C code that you plan to replace with Swift anyway, that may make sense. Otherwise, I'd highly encourage you to use @Ilanchezhian's solution to push and pop ignoring each warning.
© 2022 - 2024 — McMap. All rights reserved.