Search code examples
iosobjective-cautomatic-ref-countingreachability

Reachability class ARC error in iOS


Hi. I imported reachability.h file and reachability.m file in order to check the internet connection in my application but I'm getting an ARC error.

I have to tried to convert application into ARC but it's still showing the same error as follows:

compile Reachability.m and compile Reachability m files

implicit conversion of objective c pointer type 'Reachability *' to Cpointer type void * requires a bridged  cast

   ARC forbids explicit message send of 'dealloc'
   ARC forbids explicit message send of 'autorelease'
   ARC forbids explicit message send of 'autorelease'

  'NSAutoreleasePool' is unavailable: not available in automatic reference counting mode
  'NSAutoreleasePool' is unavailable: not available in automatic reference counting mode
   Cast of C pointer type 'void*' to Objective - C pointer type 'Rachability*' requires a bridged cast 
  release is unavailable: not available in automatic reference counting mode

  ARC forbids explicit message send of 'release

I don't know how to solve this problem. Please I need help.

Thanks


Solution

  • add your classes to stop arc mode

    enter image description here