是否可以在Restkit中安装AFNetworking 2.0 [英] is it possible to install AFNetworking 2.0 with Restkit

查看:91
本文介绍了是否可以在Restkit中安装AFNetworking 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新闻应用程序,该应用程序以XML格式在线获取新闻,并将其本地存储在sqlite dbase中。

I got an news app which fetches news online in XML format in stores it locally in the sqlite dbase.. which is perfect case for restkit.

但是,我有时也想手动获取xml数据(即不希望将其存储在dbase中)。换句话说,我想请求它直接使用AFNetworking。我喜欢在 AFNetworking 2.0 中如何自动解析xml,所以我想使用该功能。

However, I would like to also fetch xml data manually sometimes (ie and not want to store it in the dbase).. in other words i would like to request it directly with AFNetworking. I like how in AFNetworking 2.0 it does the parsing of xml automatically, and so I want to use that feature.

但是,Restkit 2.0已链接到AFNetworking 1.3 ..,因此,如果我将其添加到我的Podfile中:

However, Restkit 2.0 is linked to AFNetworking 1.3.. and so If I add this to my podfile:

pod 'RestKit', '~> 0.21.0'
pod "AFNetworking", "~> 2.0"

并运行 pod安装时出现以下错误:

and run a pod install I get the following error:

[!] Unable to satisfy the following requirements:
- `AFNetworking (~> 1.3.0)` required by `RestKit/Network (0.21.0)`- `AFNetworking (~> 2.0)` required by `Podfile`

这周围还有吗?

推荐答案

在1.3.0版中,您可以访问 AFXMLRequestOperation 实现相同的目标。

In version 1.3.0 you have access to AFXMLRequestOperation which should fulfil the same goal.

将RestKit更新为使用2.0版或重命名以便同时使用这两个版本将需要大量工作...

It would be a lot of work to update RestKit to use version 2.0, or to rename so that you could use both versions...

这篇关于是否可以在Restkit中安装AFNetworking 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆