Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Reachability.m in Xcode 4.2

I am trying to use the Reachability function in my application. Now I get several errors in the Reachability.m file. I think it's due to the new Xcode version (does not allow [release]).

Does anyone have experience in this case?

like image 951
filou Avatar asked Oct 24 '11 15:10

filou


2 Answers

Reachability is not ARC compliant. You can disable ARC on a per file basis.

Select your project -> target -> Build Phases -> Compile Sources -> Double click the Reachability.m -> add -fno-objc-arc.

Problem solved.

like image 171
logancautrell Avatar answered Oct 18 '22 15:10

logancautrell


Here's a modified Reachability that's meant to be ARC-compliant.

like image 5
curtisdf Avatar answered Oct 18 '22 13:10

curtisdf