When you do not want to use cocoapods to manage and use third-party libraries, you need to manually add and configure these third-party libraries, there will inevitably be some problems, the main issues are summarized as follows:
1, afnetworking, Nknetwork, ZXINGOBJC and other third-party libraries in order to support the lower version of the system (IOS 5,6) will appear cannot compile the following code
@property (nonatomic, Strong) dispatch_queue_t
This is because when the iOS SDK version >=6.0, ARC manages the GCD object, and when the iOS SDK version <6.0, GCD needs to be managed manually, and the following code is required for compatibility
//when declaring properties#ifOs_object_use_objc@property (Strong, nonatomic) dispatch_queue_t barrierqueue;#else@property (Assign, nonatomic) dispatch_queue_t barrierqueue;#endif//in the Dealloc method, you should add#if! Os_object_use_objc//This macro is only available after sdk6.0, and if it is before, then OS_OBJECT_USE_OBJC is 0dispatch_release (_barrierqueue);#endif//of course, you can also use#if__iphone_os_version_min_required < 60000//6.0sdk agodispatch_release (_barrierqueue);#endif//__iphone_os_version_min_required is the lowest deployment SDK version in engineering//OS_OBJECT_USE_OBJC This macro is only available after SDK6.0, if it is 6.0 before 0
If you deploy a minimum target lower than IOS 6.0 or Mac OS X 10.8
You should manage GCD objects yourself, using (dispatch_retain,dispatch_release), ARC does not manage them
If your minimum target for deployment is IOS 6.0 or Mac OS X 10.8 or higher
ARC has been able to manage the GCD object, when the GCD object is like a normal OC object, you should not use Dispatch_retain or dispatch_release
IOS manually add third-party library error issues