在从Apple安装我的配置文件后尝试测试我的iPhone应用程序时,我收到了很多"sematic问题"错误.
它在开发期间工作得很好,但是自从我设置配置文件后,每次尝试构建时都会收到以下错误(选择物理设备时为80,使用模拟器时为10):
RKRequest.h: error: Semantic Issue: Redefinition of 'RKRequestMethod'
RKRequest.h: error: Semantic Issue: Redefinition of enumerator 'RKRequestMethodPOST'
...
Run Code Online (Sandbox Code Playgroud)
我大约一个月前从它的git存储库中检索了RestKit的版本,直到现在它一直运行良好.
以下是错误详细信息的示例:
In file included from /Users/nick/Library/Developer/Xcode/DerivedData/MyApp-
bpcvkhxzjupqmibdvvipchdfecpi/Build/Products/Debug-
iphoneos/include/RestKit/CoreData/../ObjectMapping/../Network/RKClient.h:21:
Run Code Online (Sandbox Code Playgroud)
我已经尝试清除此目录,但问题仍然存在,并在下面包含了一个屏幕截图:

这是一个如何在应用程序中使用RestKit的示例:
#import <RestKit/RestKit.h>
#import <RestKit/CoreData/CoreData.h>
@interface MyViewController : UIViewController<RKObjectLoaderDelegate, MFMailComposeViewControllerDelegate, UIActionSheetDelegate, SelectTranslationDelegate>
...
Run Code Online (Sandbox Code Playgroud)
@interface MyViewController()
{
}
@end
...
@implementation MyViewController
...
Run Code Online (Sandbox Code Playgroud)

有没有人对这可能是什么有任何建议?
从屏幕截图和我们的聊天对话中,我可以告诉您正在使用过时的RestKit版本.最近,他们大大简化了构建过程并提交了许多iOS5修复程序,因此更新是值得的.
git pull在RestKit目录中运行#import <RestKit/CoreData/CoreData.h>从您的文件中删除.只是#import "RestKit/RestKit.h"应该做的伎俩libRestKit.a和libxml2.dylib