RestKit:属性“映射器”在“RKObjectManager *”类型的对象上找不到
使用新的 Xcode 和 RestKit 我遇到了映射器的问题。错误是:在“RKObjectManager *”类型的对象上找不到属性“映射器”
// Initialize RestKit
NSString* baseUrl = @"http:////172.13.12.17:3000";
RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:baseUrl];
RKObjectMapper* mapper = objectManager.mapper;
有人知道我如何解决这个问题吗?谢谢,凡妮莎
Using the new Xcode and RestKit I am facing a problem with the mapper. The error is: Property 'mapper' not found on object of type 'RKObjectManager *'
// Initialize RestKit
NSString* baseUrl = @"http:////172.13.12.17:3000";
RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:baseUrl];
RKObjectMapper* mapper = objectManager.mapper;
Does someone knows how I could fix this? Thx, Vanessa
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在最新的 RestKit master 分支上,对象映射已被完全重新设计,使得 RKObjectManager 类中不再存在映射器属性。您可能会在使用旧的对象映射代码示例时遇到问题,该代码示例是在映射子系统进行重大检修之前编写的。
On the latest RestKit master branch, object mapping has been completely reworked, such that the mapper property no longer exists on the RKObjectManager class. You're probably running into issues following an old code example for object mapping that was written prior to the major overhaul of the mapping subsystem.