xcode 如何将 cfnetwork 和其他框架添加到您的项目中以进行异步传输 - iphone

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1474621/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:51:55  来源:igfitidea点击:

how to add cfnetwork & other frameworks to your project for asynchronous transmission - iphone

iphonexcodeasynchronouscfnetwork

提问by Sagar R. Kothari

I am trying to add facility of asynchronous transmission in my project.

我正在尝试在我的项目中添加异步传输功能。

I want following in my application.

我想在我的应用程序中遵循。

  • A table view should load data through web service ( I can do )
  • Each cell must have an image ( I can do )
  • 表视图应该通过 Web 服务加载数据(我可以)
  • 每个单元格必须有一个图像(我可以做到)

But the problem is up to now I was using synchronous transmission. i.e all data is loaded & then displayed including images.

但问题是到现在我都是用同步传输的。即所有数据都被加载,然后显示,包括图像。

Now, like apple store's table view images are loaded after sometimes. I know that is asynchronous transmission.

现在,像苹果商店的表格视图图像有时会在加载后。我知道那是异步传输。

Even I have tried to understand the pokeb-asi example.

甚至我也试图理解 pokeb-asi 的例子。

But the problem is as follows.

但问题如下。

" I am failure in adding all those frameworks & files ( which are necessary for asynchronous transmission ) in a new application of iPhone. "

“我未能在 iPhone 的新应用程序中添加所有这些框架和文件(异步传输所必需的)。”

Question is How to do this ?

问题是如何做到这一点?

Edit :

编辑 :

Frameworks are added successfully.

框架添加成功。

Now i have added ASINetworkQueue.h & m + ASINSStringAdditions.h & m & all the files to my project.

现在我已将 ASINetworkQueue.h & m + ASINSStringAdditions.h & m & 所有文件添加到我的项目中。

I am getting errors of this kind.

我收到此类错误。

-[ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in ASIHTTPRequest.o

-ASIHTTPRequest.o 中的[ASIHTTPRequest attemptToApplyProxyCredentialsAndResume]

All the errors are of .o type.

所有错误都是 .o 类型。

_SCNetworkReachabilityGetFlags referenced from : [Reachability remoteHostStatus] in Reachability.o

_SCNetworkReachabilityGetFlags 引用自:[Reachability remoteHostStatus] in Reachability.o

How to solve this erros ?

如何解决这个错误?

回答by Rob Napier

If you want to add CFNetworkto your project, double-click the Target in your Groups and Files list. Go to the General pane, and click the "+" for Linked Libraries. Choose CFNetwork. It will then link with your project.

如果要添加CFNetwork到项目中,请双击组和文件列表中的目标。转到“常规”窗格,然后单击“链接库”的“+”。选择 CFNetwork。然后它将与您的项目链接。

Is there more to your question?

你的问题还有吗?

EDIT: Look up SCNetworkReachabilityGetFlagsin the docs. You will see it's part of SystemConfiguration.framework. You need to add that as well.

编辑:SCNetworkReachabilityGetFlags在文档中查找。你会看到它是SystemConfiguration.framework. 您还需要添加它。