-8

Check this out & let me know what you guys think is wrong. Thank you very much. :)

Image

Chris Morgan
  • 86,207
  • 24
  • 208
  • 215

2 Answers2

0

Try this:

if([[Reachability reachabilityForInternetConnection] currentReachabilityStatus] == NotReachable)

OR, In clear way

- (BOOL)connected
{
    Reachability *reachability = [Reachability reachabilityForInternetConnection];
    NetworkStatus networkStatus = [reachability currentReachabilityStatus];
    return !(networkStatus == NotReachable);
}

Instead of

if([[Rechability (id)]  currentRechabilityStatus] == NotRechable)

Put

if(![self connected])
Guru
  • 21,652
  • 10
  • 63
  • 102
0

here you have written type (id) & not written any identifier for this (id), thats why it is giving error.compiler always except identifier after the data type.

it should be only

[reachability currentReachabilityStatus];
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70