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;