最近项目中用到了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区别
** * 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》是一本深入探讨面向对象编程(OOP)与Objective-C语言的专业书籍。Objective-C是Apple开发的一种强大的、面向对象的编程语言,主要用于iOS和macOS的应用程序开发。这...
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 ...
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” ...
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 ...
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 ...
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 ...
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....
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....
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 ...
新型算法用于图像分割 ...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.
(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 ...
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.
(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 ...
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开发中,Objective-C是主要使用的语言之一,而Objective-C中的属性声明是理解对象交互方式的关键。本文将详细解释`retain`和`assign`的区别,以及其他相关的属性修饰符如`...
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 ...
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 ...
* 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 ...