您的位置:首页 > 移动开发 > Objective-C

[问题记录]Property with 'retain (or strong)' attribute must be of object type

2015-05-27 17:59 549 查看
引用第三方开源库"Reachability.h",编译的时候报错:

Property with 'retain (or strong)' attribute must be of object type

发现错误是在:

@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue;

搜索了一番,原来这是因为SDK低于6.0时,dispatch_queue_t ARC没有托管,出现错误

只需将报错这一段修改为:

#if OS_OBJECT_USE_OBJC

@property (nonatomic, strong)
dispatch_queue_t reachabilitySerialQueue;

#else

@property (nonatomic, assign)
dispatch_queue_t reachabilitySerialQueue;

#endif

即可解决问题!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐