Xcode 6 - Unknown type name 'NSString' / Expected identifier or '('

后端 未结 5 742
甜味超标
甜味超标 2021-01-04 12:15

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 no         


        
相关标签:
5条回答
  • 2021-01-04 12:21

    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++.

    0 讨论(0)
  • 2021-01-04 12:26

    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

    0 讨论(0)
  • 2021-01-04 12:27

    You can also try deleting the Samples folder in the FacebookSDK folder (and then deleting the reference to it in Xcode.

    0 讨论(0)
  • 2021-01-04 12:34

    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 :

    #ifdef __OBJC__
    #import <OOObjectiveCClass.h>
    #endif
    
    0 讨论(0)
  • 2021-01-04 12:40

    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!

    0 讨论(0)
提交回复
热议问题