When I am running my project in Xcode 6, I am having many weird errors.
Parse Issue - Unknown type name 'NSString'
Format argument not an NSString
Could not build module Foundation
Could not build module QuartzCore
All of these errors occur in Apple's header files such as: CAMediaTiming.h, NSObjCRuntime.h,NSZone.h,NSObject.h, CALayer.h, etc.
Unfortunately, the answers in here: ios - Parse Issues in NSObjCRuntime, NSZone, and NSObject did not work for me.
How do you recommend I fix these errors?
You can get this error if you have a PrefixHeader file that imports Objective-C code and also some plain C files in your project, because the C files try to import the Objective-C.
To fix, wrap your objective-c imports like this :
You can also try deleting the Samples folder in the FacebookSDK folder (and then deleting the reference to it in Xcode.
I use Xcode 8.3.3,I also encounter this problem,and I solve this issue by selecting the file and in the right panel in Xcode in the Identity and Type part choose Type to Objective-C++.
See if the Prefix Header file path is correctly placed under Build Settings tab. See the complete answer at the following link.
Check this post
The problem was that I had some
.c
files in my project, apparently Xcode 6 doesn't like.c
files.I changed the extension of the
.c
files to.m
and Xcode 6 is happy again!