IOS network programming-installation and configuration of the asihttprequest framework-graphic illustration

Source: Internet
Author: User

Asihttpreques The T framework is an excellent third-party HTTP framework for objective-C. It supports HTTP development in Mac OS X and IOS. The technical support website is http://allseeing-i.com/asihttprequest /. It has the following advantages:
Supports data downloading in memory or local files
Easy access request and response HTTP Header
Supports cookies
Supports gzip requests or responses
Supports caching
Supports synchronous or asynchronous requests
Support for HTTPS
However, the asihttprequest framework does not support arc. It may be difficult to develop and configure it under arc. The examples we introduce in this chapter are developed under arc.
Install and configure the asihttprequest framework
First, begin.
Then we need to add some supported class libraries or frameworks for the project, including:
Cfnetwork. Framework
Systemconfiguration. Framework
Mobilecoreservices. Framework
CoreGraphics. Framework

Libz. dylib
Select targets (number ①) of the project, select build phases (number ②), and then select number ③. In the displayed dialog box, select the above framework or class library. Finally, click Add as shown in Area 4.
In this way, the class libraries and frameworks required by the asihttprequest framework are added. Then we can compile it to see if there are any errors. If our project uses arc (automatic reference counting) to manage the memory, it will be a little troublesome and there will be compilation errors.

It cannot be seen that these compilation errors are not supported by arc because the asihttprequest framework itself does not support the arc technology. Source code MRC (manual reference Management)
Count ). The solution is to use these sources in the asihttprequest framework. Program File, the setting does not use arc compilation, and the compilation parameter is-fno-objc-arc. Select
Targets (number ①), and then select build
Phases (Number 2), select a file in asihttprequest, double-click the file, and enter "-fno-objc-arc" in the dialog box ".

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.