When I recently manually imported the Afnetworking 2.6.0 framework, I found that Xcode reported 3 errors as follows:
1. Use of undeclared identifier ' Ksecformatunknown '
2. Use of undeclared identifier ' Ksecitempemarmour '
3. Implicit declaration of function ' Secitemexport ' is invalid in C99
The query found that there are two ways to solve the problem:
The first type: Install the afnetworking frame through cocoapods, please refer to:
Https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking
The second type: Add the following code to the project PCH file, or you can include the following code directly in the AFSECURITYPOLICY.M file in the AFN framework:
#ifndef target_os_ios#define target_os_ios target_os_iphone#endif#ifndef target_os_watch#define TARGET_OS_WATCH 0# endif
IOS afnetworking 2.6.0 Framework Import Error resolution method