On iphone - how can you tell if you can send a txt - ie if you are in cellphone range [MFMessageComposeViewController canSendText] actually seems to mean "Could I send a txt if I was in rang开发者_如何学Pythone" and
CTTelephonyNetworkInfo *carrierInfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = carrierInfo.subscriberCellularProvider; is not nil even when it is out of range - provided it has connected in past.is there some other method/function
SCNetworkReachability
might sort of do what you want, but not quite. Anyway just an idea probably worth looking into. Unfortunately I think it mostly tells you about "data" network connectivity. There is also Apple's "Reachability" sample code.
精彩评论