15

Updated my project to AFNetworking, Xcode show this error:

@property (nonatomic, strong) dispatch_queue_t completionQueue;

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

I cannot understand why the official example there is no error warning?

Vineet Singh
  • 4,793
  • 1
  • 29
  • 39
Chris
  • 581
  • 3
  • 17
  • 2
    Short answer: make sure that Pod which depends on AFNetworking 2.0 has `platform :ios, '6.0'` spec. I had a Pod (with s.dependency AFNetworking) specified for `platform :ios`, therefore build phases for this Pod had `DOS_OBJECT_USE_OBJC=0` flag for the file, which imported AFNetworking and [dispatch_queue_t happened to be opted-out from being an object](http://stackoverflow.com/questions/8618632/does-arc-support-dispatch-queues). – Roman B. Jan 20 '14 at 11:39
  • 1
    The above comment doesn't work for me. To solve the compile error, I changed the build setting `iOS Deployment Target` to `iOS 6.0`. – Hai Feng Kao Feb 07 '14 at 16:20

1 Answers1

23

I get it, because I test on iOS5, dispatch_queue_t is objcet begin at iOS6

Chris
  • 581
  • 3
  • 17