Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple's Reachability without ARC

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.

like image 732
Eugene Trapeznikov Avatar asked May 17 '12 05:05

Eugene Trapeznikov


2 Answers

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.

like image 193
Lily Ballard Avatar answered Oct 15 '22 23:10

Lily Ballard


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

like image 1
ilight Avatar answered Oct 16 '22 00:10

ilight