iOS 导入AFNetworking时报错
在AFSecurityPolicy.m这个类中,第30行,会报这样三个错误
-
Use of undeclared identifier ‘kSecFormatUnknown’
-
Use of undeclared identifier ‘kSecItemPemArmour’
-
Implicit declaration of function ‘SecItemExport’ is invalid in C99
解决办法:
在项目pch文件中写入如下代码:
#ifndef TARGET_OS_IOS
#define TARGET_OS_IOS TARGET_OS_IPHONE
#endif
#ifndef TARGET_OS_WATCH
#define TARGET_OS_WATCH 0
#endif
本站文章除注明转载外,均为原创文章。转载请注明:文章转载自:
Zhazha(
http://bigqiang.com )