Afnetworing Import Error Solution

Source: Internet
Author: User
Tags uikit

The first report cannot find interface declaration for ' UIImage or use of undeclared identifier ' UIImage ' when we want to import this frame on the error page

' #import

The second error, in the AFSECURITYPOLICY.M class, will report such three errors

1. Use of undeclared identifier ' Ksecformatunknown '

2. Use of undeclared identifier ' Ksecitempemarmour '

3. Implicit declaration of function ' Secitemexport ' is invalid in C99

The solution is:

25//#if! Target_os_ios &&! Target_os_watch

#if!defined (__iphone_os_version_min_required)

44//#if Target_os_ios | | Target_os_watch

#if defined (__iphone_os_version_min_required)

The third if you use the 2.0 version of the data please have an error

Workaround:

Text/html is not supported by default in Afnetworking 2.0

AFURLRESPONSESERIALIZATION.M-self.acceptablecontenttypes = [Nsset setwithobjects:@ "Application/json", @ "text/ JSON ",

@ "Text/javascript", nil]; Add @ "text/html"

Afnetworing Import Error Solution

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.