6

I want to check Internet connection in my app. So i use Apple's Reachability sample code.

But because of using ARC there are some errors. I correct some of them but other errors still in my code.

enter image description here

How should i solve this problems? Any ideas?

Thnx.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Eugene Trapeznikov
  • 3,220
  • 6
  • 47
  • 74
  • Try to make ARC disable. [look this](http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project) modified – hp iOS Coder May 17 '12 at 05:51

2 Answers2

22

You can disable ARC on a per-file basis.

  1. Select the project in the file list
  2. Select the target
  3. Click the Build Phases tab
  4. Open the Compile Sources phase
  5. Scroll down until you find your source file (or use the search field)
  6. Double-click in the Compiler Flags column for that file
  7. Enter -fno-objc-arc

Now ARC is disabled for that one file.

Lily Ballard
  • 182,031
  • 33
  • 381
  • 347
1

Try using this for your ARC version code -> Reachability (iOS) ARCified

ilight
  • 1,622
  • 2
  • 22
  • 44