Apple Mach-O Linker Error when compiling for device
Here is permanent solution.Generally overwriting project may cause this prolems.Try this method.
-UPDATE - Clang error - Mach-O Linker error
In some case error log window displaying .xctest error, to fix it
-> Select your project
-> Beside this(just before General tab) select your projectTest file from dropdown
-> There is one option (like ProjNameTests)
-> In Host Application, select your project from dropdown only if it show custom
DONE!
Old method deleted
Just ran into the same issue.
The solution (for me) = check your frameworks.
In my case I had added classes related to CoreData without "CoreData.framework". Adding it solved the MACH_O complaining.
open .xcworkspace file not .xcodeproj. I repeat open .xcworkspace file. All of your errors will go away.
I had the same problem and the issue was that I have accidently imported a .m file instead of .h in an implementation file - hope it helps