手动导入AFNetwork报错

来源:互联网 发布:淘宝评价怎么不能晒图 编辑:程序博客网 时间:2024/06/07 07:10

iOS 开发中导入AFNetworking网络框架时时报错。

出现如下错误提示

1. Use of undeclared identifier 'kSecFormatUnknown'
2. Use of undeclared identifier 'kSecItemPemArmour'
3. Implicit declaration of function 'SecItemExport' is invalid in C99

如图所示:




解决方法:

AFSecurityPolicy.m文件 把下面两个头文件换一下可解决问题,但是不知会否引起其他问题,我目前在用没问题
将:#if !TARGET_OS_IOS && !TARGET_OS_WATCH
替换成:#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)

将:#if TARGET_OS_IOS || TARGET_OS_WATCH
替换成:#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
0 0
原创粉丝点击