[问题记录]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
即可解决问题!
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
即可解决问题!
相关文章推荐
- Property with 'retain (or strong)' attribute must be of object type
- Property with 'retain (or strong)' attribute must be of object type
- 『IOS』Property with 'retain (or strong)' attribute must be of object type
- Property with 'retain (or strong)' attribute must be of object type
- AFNetworking 2.0 ERROR:Property with 'retain (or strong)' attribute must be of object type [duplicat
- Property with 'retain(or strong)' attribute must be of object type
- XCode中互相包含引起的"property with 'retain(or strong)' attribute must be of object type"错误与解决
- Property with 'retain(or strong) attribute must be of object type
- 解决 s.dependency 'AFNetworking' 出现 Property with 'retain (or strong)' attribute must be of object typ
- ios获取类的属性,获取CLPlacemark类所有属性,Declaration of 'objc_property_t' must be imported from module 'objecti
- Attribute name "aphmodel" associated with an element type "mxg" must be followed by the ' = ' charac
- 【hibernate】Attribute "column" must be declared for element type "property"解决办法
- 关于json解析时异常org.json.JSONException: A JSONObject text must begin with '{' at character 1 of {的解决方法
- org.json.JSONException: A JSONObject text must begin with '{' at character 1 of {解决方法
- Java中json数据问题.报错 A JSONObject text must begin with '{'
- Attribute value is quoted with " which must be escaped when used within the value 问题解决
- 简单的问题,用类创建一个对象error C2380: type(s) preceding 'Complex' (constructor with return type, or illegal redefinition of current class-n
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server
- Attribute value is quoted with " which must be escaped when used within the value 问题解决
- Property 'edgesForExtendedlayout' not found on object of type 解决方案