`
jsntghf
  • 浏览: 2533642 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

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

    博客分类:
  • iOS
阅读更多

最近项目中用到了AFNetworking,在iOS 6.0以上版本编译时可以正常运行,但在低于iOS 6.0的版本编译时,会编译失败,主要是报以下错误:

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

 

主要涉及AFURLConnectionOperation.h和AFURLSessionManager.h两个文件,由于低于iOS 6.0时,dispatch_queue_t ARC没有托管,所以会出现这样的情况。

 

解决如下

#if OS_OBJECT_USE_OBJC
@property (nonatomic, strong) dispatch_queue_t completionQueue;
#else
@property (nonatomic, assign) dispatch_queue_t completionQueue;
#endif

 

分享到:
评论

相关推荐

    @property中的retain,copy,assign区别

    @property中的retain,copy,assign区别

    针式时钟源代码

    ** * Redistributions of source code must retain the above ...** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission.

    《Object-Oriented Programming with Object C》 英文高清原版 PDF

    《Object-Oriented Programming with Object C》是一本深入探讨面向对象编程(OOP)与Objective-C语言的专业书籍。Objective-C是Apple开发的一种强大的、面向对象的编程语言,主要用于iOS和macOS的应用程序开发。这...

    IOS5 Programming Cookbook

    In Objective-C, typecasting can be necessary when working with generic collections or interoperating with C code. - **Explicit Casting**: Explicit casting is performed using `(type)` syntax. For ...

    BlueToolInstall

    1.3. “Broadcom Product” means any of the proprietary integrated circuit product(s) sold by Broadcom with which the Software was designed to be used, or their successors. 1.4. “Derivative Work” ...

    polycom宝利通视频会议软件3.9 2018

    by accepting these terms or by installing, downloading, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be and will be bound by the terms of this Agreement as a condition of your ...

    TeeChart2013_130818_SourceCode

    and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number shall constitute a breach of this EULA, the ...

    Puerto Moa DESOFT_denoising_CodeName_

    Redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met: * Redistributions of source code must retain the above ...

    Berg Soft Next Suite 6 v6.3.7.rar

    All redistributions of the component files must retain all copyright notices and web site addresses that are currently in place, and must include this list of conditions without modification....

    New\NextGrid4.8.

    All redistributions of the component files must retain all copyright notices and web site addresses that are currently in place, and must include this list of conditions without modification....

    百度画图插件echart

    Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must ...

    麻雀优化kmeans用于图像分割.zip

    新型算法用于图像分割 ...All rights reserved. ...OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    Struts2上传所需jar包

    (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those ...

    Feature selection library

    Matlab中好用的数据降维和特征选择工具包 ...OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    struts1.3.9.zip

    (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those ...

    TeeChart2013_131216_SourceCode

    and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number shall constitute a breach of this EULA, the ...

    Ios retain assign区别

    ### iOS开发中retain与assign的区别 在iOS开发中,Objective-C是主要使用的语言之一,而Objective-C中的属性声明是理解对象交互方式的关键。本文将详细解释`retain`和`assign`的区别,以及其他相关的属性修饰符如`...

    4.7秒移动1.7G(fastcopy)

    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above ...

    NMODE 张量计算

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the ...

    kontrollbase

    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the ...

Global site tag (gtag.js) - Google Analytics