'Object' is ambiguous for type lookup in this context in Xcode 9

For me the cause of the error was same name of the Class for two different Cocoapods. If you are integrating pods to your VC, try to delete some of them by clearing 'Import ...' line at the top of your VC file.


In my case, I had this ambiguity because the class was declared in a swift file and also being auto-generated by my data model.

If you already declare your class in a swift file, then make sure the code generation is disabled for it.

  1. Select your entity in your xcdatamodeld
  2. Open the third tab, Data Model inspector:
    enter image description here
  3. Set Codegen to Manual/None
    enter image description here