1.AFNetworking:手动导入AFNetworking 2.6.0时发现如下错误:
Use of undeclared identifier ‘kSecFormatUnknown‘
Use of undeclared identifier ‘kSecItemPemArmour‘
Implicit declaration of function ‘SecItemExport‘ is invalid in C99
查询后发现, 解决方法有如下两种:
第一种: 通过CocoaPods安装AFNetworking
第二种:在项目Pch文件中添加如下代码:
#ifndef TARGET_OS_IOS
#define TARGET_OS_IOS TARGET_OS_IPHONE
#endif
#ifndef TARGET_OS_WATCH
#define TARGET_OS_WATCH 0
#endif
2.SDWebImage报错:
Use of undeclared identifier '_executing';
Use of undeclared identifier '_finished';
解决方法:
在SDWebImageDownloaderOperation类的实现中(@implementation SDWebImageDownloaderOperation{…}下面)添加:
@synthesize executing = _executing ;
@synthesize finished = _finished;
本文提供了解决AFNetworking版本2.6.0导入时出现的错误及SDWebImage报错的方法,包括通过CocoaPods安装AFNetworking和在项目pch文件中添加特定代码段的解决方案。
1484

被折叠的 条评论
为什么被折叠?



