我运行了 "pod update" 命令,现在我的 RestKit 版本是 0.25.0,我的 RKValueTransformers 版本是 1.1.2,出现了一个错误:"RKObjectMapping.h" 找不到。我查看了 RestKit 的 Github 页面,没有找到新版本更改了什么内容。
以下步骤可以重现此错误:
1) 创建一个新项目 2) 运行 "pod init" 命令 3) Podfile 如下:
3)打开 .xcworkspace。 4)在 viewcontroller.m 中。
以下步骤可以重现此错误:
1) 创建一个新项目 2) 运行 "pod init" 命令 3) Podfile 如下:
platform :ios, '8.3'
#pod 'RestKit', '~> 0.20.0'
#pod 'RestKit', '~> 0.24.1'
pod 'RestKit'
在所有不同版本的情况下,问题是相同的。3)打开 .xcworkspace。 4)在 viewcontroller.m 中。
#import <RestKit/ObjectMapping/RKObjectMapping.h>
#import <RestKit/ObjectMapping/RKRelationshipMapping.h>
#import <RestKit/Network/RKResponseDescriptor.h>
#import <RestKit/Network/RKObjectRequestOperation.h>
#import <RestKit/Support/RKLog.h>
#import <RestKit/CoreData/RKEntityMapping.h>
#import <RestKit/Network/RKObjectManager.h>
或者#import "RKObjectMapping.h"
#import "RKRelationshipMapping.h"
#import "RKResponseDescriptor.h"
#import "RKObjectRequestOperation.h"
#import "RKLog.h"
#import "RKEntityMapping.h"
#import "RKObjectManager.h"
错误仍然存在:"RKObjectMapping.h"在RestKit Pod文件中未找到
注意:我正在使用Xcode 7-beta5,Objective-C
RKObjectMapping.h
是干什么用的? - Wain