-2

I have problem with detect sim, i was used CTCarry but not dectect when device "No Service" , Please help me how to detect it.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
vualoaithu
  • 936
  • 10
  • 9

1 Answers1

0

Use the Reachability class from Apple:

Reachability *reachability = [Reachability reachabilityForInternetConnection];
[reachability startNotifier];

NetworkStatus status = [reachability currentReachabilityStatus];
switch(status) {
    case NotReachable:
        return @"No Service";
    case ReachableViaWiFi:
        ...
}

Alternatively you can use the SCNetworkReachability class directly.

Mike Kwan
  • 24,123
  • 12
  • 63
  • 96