AFNetworking編譯報錯  Property with 'retain (or strong)' attribute must be of object type


AFNetworking 2.0 當Deployment Target 低於6.0時,AFURLConnectionOperation.h,AFURLSessionManager.h

@property (nonatomic, strong) dispatch_queue_t completionQueue;

由於sdk低於6.0時,dispatch_queue_t  ARC沒有托管,出現提示錯誤

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

修改為

#if OS_OBJECT_USE_OBJC

@property (nonatomicstrong) dispatch_queue_t completionQueue;

#else

@property (nonatomicassigndispatch_queue_t completionQueue;

#endif

/**

 The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.

 */

#if OS_OBJECT_USE_OBJC

@property (nonatomicstrong) dispatch_group_t completionGroup;

#else

@property (nonatomicassigndispatch_group_t completionGroup;

#endif


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM