I want to use #pragma
(in Xcode) to suppress the warning:
warning: instance method '-someMethod' not found (return type defaults to 'id')
I've tried:
#pragma GCC diagnostic ignored "-Wmissing-declarations"
And several others, but nothing works.
What warning causes the "instance method not found"?
As requested here is the actual code:
...
if (sampleRate > 0 && ![self isFinishing]) //<--- Warning here
{
return self.progress;
}
...
And the build log output:
/Users/User1/Documents/Project/branch/client/Folder/CodeFile.m:26:32:{26:32-26:50}: warning: instance method '-isFinishing' not found (return type defaults to 'id') [3]
if (sampleRate > 0 && ![self isFinishing])
^~~~~~~~~~~~~~~~~~
See: https://stackoverflow.com/a/34043306/89035 for a #pragma to suppress "instance method not found" warnings.
While it seem that a true #pragma
solution to this does not exist turning off the warnings in individual files can be accomplished by use of the -w
switch.
NB: This solution is for Xcode 4.2 and above
-w
switch to the file(s) you wish to suppress warnings on