开发者

ios how can you tell if phone is in cellphone range and can send a txt

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜