ARC and ASIHTTPRequest
Asked Answered
H

2

12

I have a strange problem.

I use ASIHTTPRequest in a iOS 5 project with ARC enabled. Since ASIHTTPRequest does not support ARC I have disabled ARC on all individual ASIHTTPRequest files.

enter image description here

However, when I'm trying to compile my project, xcode still believes that those files are ARC-enabled and it complains.

enter image description here

Did I do anything wrong or is that a bug in xcode? Don't tell me to convert ASIHTTPRequest to ARC-compatible code with the refactor tool. I have tried to do that and xcode complains on that ARC is enabled on the project (?!?!).

Hippocrene answered 1/1, 2012 at 18:34 Comment(0)
B
23

You typed -fno-ojbc-arc. The correct flag is -fno-objc-arc.

Bakerman answered 1/1, 2012 at 18:40 Comment(2)
Thank you a lot! I'm blinded some times.Hippocrene
Glad to help. Maybe you didn't yet fully recovered from new year's eve ;-)Bakerman
N
10

I did it this way.

You have to make the ASIHTTP as a library and include it in your project.

Following is the procedure.

  1. Create iPhone Project Cocoa Touch Static Library.
  2. Copy all the ASIHTTP supported files and Rechability .h and .m files inside the Library Project.
  3. Make a Build.
  4. You will get a .a file.
  5. Copy the file in your project.
  6. Copy the necessary .h (header) files you are going to use in your project.

You will not get any ARC Error. Hope it helps some one facing similar ARC problems..

Nattie answered 28/5, 2012 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.