0

I'm getting a very strange error trying to compile my project, I get an error in NSValue.h saying 'Duplicate interface definition for class 'NSValue' (and NSNumber).

I've tried cleaning and rebuilding, I've tried clearing the module cache using:

rm -rf /Users/me/Library/Developer/Xcode/DerivedData/ModuleCache/*

I've tried removing and re-adding the Foundation framework in combination with the above, but I still get the error.

What's going on?

fredley
  • 32,953
  • 42
  • 145
  • 236

1 Answers1

2

Okay I spotted what was causing the error: in one of my files I had

#import <foundation/Foundation.h>

instead of

#import <Foundation/Foundation.h>

(with a capital F). Fixing this solved the problem.

fredley
  • 32,953
  • 42
  • 145
  • 236