I have a class exposing some methods, whose implementation is provided by an inner object.
I’m using forward invocation to dispatch at runtime the method calls to the inner object, but XCode is complaining since it cannot find an implementation of the declared methods.
I found some other similar questions on SO, but all of them were solved with a design change.
I don’t mean to have a discussion about the design here, but if anybody has some suggestion about it I have an open question on Code Review, which is more suitable for such kind of discussions.
My question is here is whether a method to turn off the Incomplete Implementation warning in XCode exists.
You can suppress
Incomplete Implementationwarnings by addingjust above the
@implementationHope this helps
EDIT
After being told in the comments that this didn’t work for someone and finding out the reason was because it was a different warning they were getting I have done a bit of playing around and been able to solve there issue to so I thought I would update this answer to include theirs and for
GCCignores as well. So for the issue for@Tonythe following should workFor anyone wanting to know the
GCCcompiler version it isI will also make a point that all these
diagnotstic ignorescan also be done by specifying the setting on a per file basis by going toXCODE Project >> Target >> Build Phases >> Compile Sourcesand adding a compiler-flag so you would just add-WprotocolorWincomplete-implementationor whatever compiler-flag you needed.Hope this update helps all if anymore need I will update my answer to include.
EDIT 2
I was doing a bit more digging around about this an came across the Clang Compliler User’s Manual so I thought that this would be interesting and helpful to anyone having issues around this area still.
I have also found another way that you can use these
#pragma diagnostic ignoresand that is you canpushandpopthem so if you wanted to just ignore a particular section of the file and not all of it then you could do the followingRemember that all these
#pragmacompile ignores can be used withGCCas well so the above wouldThe
pushandpopseem to work with all thediagnostic ignoresI have tried so far.Another one is
The one for suppressing unused variables is
and the GCC version being
A few more for ignoring warnings from unavailableInDeploymentTarget
and performSelector leaks
and deprecated declarations
Thanks to
DanSkeelyou can find the entire list here