I'm implementing a class but I'm getting this error:
Use of undeclared type 'myProtocol'
Here is my code:
class LocalContactService: myProtocol{
Any of you knows why I'm getting this error?
I'm implementing a class but I'm getting this error:
Use of undeclared type 'myProtocol'
Here is my code:
class LocalContactService: myProtocol{
Any of you knows why I'm getting this error?
I my case I had to clean the build folder, close the project, run
pod install
, and then the issue disappeared.i had the same error .in my case i found accidentally that i added my swift files into "copy bundle resource" in "build phase" i removed all swift file except assets then everything worked fine.
Perhaps you've never defined
myProtocol
. Or if you have, maybe it's out of scope in theLocalContactService
classI got this error when someone pushed changes that they made to the
project.pbxproj
file.Select the file hit
delete
and choose the option toRemove Reference
Add the file back to the project, clean (cmd + shift + k), and rebuild
Go to your
myProtocol
class, and on the right side (If you are using XCode), click the Tests of your class. This is what I mean."Use of undeclared type" in Swift, even though type is internal, and exists in same module