So I accidentally modified a header (CBCentralManager.h) and caused the above error to show when I build. I searched stack overflow for the solution, and found
CBCentralManager.h)
quit xcode and reopen it .This fixed my problem.