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,009
  • 1
  • 28
  • 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
  • Hi,already at iOS6 but the same error,just don't know why. – Vienta Nov 05 '14 at 08:06
  • updated it too to iOS in the deployment target, but still doesn't work. I know this thread has been a bit inactive lately, but anybody has an alternative to suggest? – Kostas Livieratos Feb 04 '15 at 09:18
  • were you able to fix this? my target is already 6.0 – cessmestreet May 06 '15 at 09:46
  • It might be too old, however I fixed it with this POD option:platform :ios, '7.0' pod 'AFNetworking', '1.3.3'. Seems like recent SignalR works only with AfNetworking lib v 1.3.3 – iago849 Aug 17 '15 at 14:53