Reputation: 902
I'm new to AFNetworking earlier I was using ASIHTTPRequest and now I want to shift to AFNetworking after researching a lot on google. But now when I download the Library and want to look at the example project I'm facing errors in the code.
I just compiled and I got 13 errors, please have a look at the image below, any help will be greatly appreciated.
Upvotes: 1
Views: 2469
Reputation: 692
The example should run fine as it is provided as part of the AFNetworking script on github
These are the Requirement Notes for the AFNetworking project https://github.com/AFNetworking/AFNetworking
AFNetworking 1.0 and higher requires either iOS 5.0 and above, or Mac OS 10.7 (64-bit with modern Cocoa runtime) and above.
For compatibility with iOS 4.3, use the latest 0.10.x release.
ARC
AFNetworking uses ARC as of its 1.0 release.
If you are using AFNetworking 1.0 in your non-arc project, you will need to set a -fobjc-arc compiler flag on all of the AFNetworking source files. Conversely, if you are adding a pre-1.0 version of AFNetworking, you will need to set a -fno-objc-arc compiler flag.
To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all AFNetworking source files, press Enter, insert -fobjc-arc or -fno-objc-arc and then "Done" to enable or disable ARC for AFNetworking.
Upvotes: 1
Reputation: 7341
You need to define properties of objects as unsafe_unretained/strong/weak/copy/retain/assign.
Upvotes: 0
Reputation: 5407
the erros have nothing to do with AFNetworking, it's the Post.m file in your sample project. Have you declared the text and user properties in Post.h?
Upvotes: 3