0

I installed ASIHTTPRequest follow the document on their official site . But still have errors here. Please help. The related info is as follows :

Xcode 4.2 build 4D58

Lion 10.7.2

I can not upload the images because I am rookie here.(now I upload to site and linked here)

http://roundmov.com/project.png build settings and build phrase png is here :

http://www.roundmov.com/buildphases.png

I have added all the files including external dir. and added libraries ,all of them in docs mentioned. Even added the header search paths as $[SDKROOT]/usr/include/libxml2

But still have 107 or 67 errors . This problem has boring me one more day.

Thanks a lot in advance!

I Bajwa PHD
  • 1,708
  • 1
  • 20
  • 42
william.shark
  • 91
  • 1
  • 8
  • can you copy/paste some of the errors? i don't suppose they're ARC related? – Mike K Dec 23 '11 at 03:08
  • Thank you for your quick answer! there are many many errors . Most are "Automatic Reference Counting Issue ARC forbids explicit message send of 'autorelease' " or Issue Case of C pointer type 'CFStringRef'....etc. – william.shark Dec 23 '11 at 03:23
  • thank you again! I setted the 'Objective-C++ Automatic Reference Counting ABI incompatibilities'= NO and recompile , it still has 67 errors like before. Should I create new project and set the Var=NO before I import ASIHTTPRequest ? the image is here : http://www.roundmov.com/setted.png – william.shark Dec 23 '11 at 04:09
  • 1
    possible duplicate of [Why are my ASIHTTPRequest files showing ARC errors?](http://stackoverflow.com/questions/8375508/why-are-my-asihttprequest-files-showing-arc-errors) – JosephH Dec 23 '11 at 10:14

2 Answers2

3

How can I disable ARC for a single file in a project?

If you follow the instructions here for all of the ASIHTTPRequest files it will compile as you need to disable arc on those files.

Community
  • 1
  • 1
Philippe Sabourin
  • 8,066
  • 3
  • 31
  • 46
0

ah right, yep, so ASIHTTPRequest isn't ARC compatible and it doesn't look like that will change. i've never actually "downgraded" a project from ARC to non-ARC, but if it's something you've just started on you could create a new project and uncheck the ARC checkbox when you do and re-add all your existing files. this will mean you need to handle the memory management of objects (retain/release/autorelease).

this thread has more info: https://groups.google.com/group/asihttprequest/browse_thread/thread/3f26e442dc6868e8

as an alternative, you could look into AFNetworking: https://github.com/AFNetworking/AFNetworking

you still need to take some extra steps to get it working with ARC, but it doesn't look too bad.

Mike K
  • 2,227
  • 1
  • 12
  • 6
  • The 'extra steps' to get AFNetworking to work with ARC are exactly the same ones you take to get ASIHTTPRequest to work with ARC - ie. disabling ARC for the AFNetworking/ASIHTTPRequest source files. – JosephH Dec 23 '11 at 10:12
  • ahh ok, i wasn't sure if ASIHTTP had non-ARC compliant code in .h files. still, it looks like ASIHTTP is no longer being maintained. – Mike K Dec 23 '11 at 10:17