Eugene Trapeznikov
Eugene Trapeznikov

Reputation: 3240

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.

Upvotes: 6

Views: 3893

Answers (2)

Lily Ballard
Lily Ballard

Reputation: 185811

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.

Upvotes: 22

ilight
ilight

Reputation: 1622

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

Upvotes: 1

Related Questions