开发者

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

开发者 https://www.devze.com 2023-01-21 14:12 出处:网络
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开发者_如何

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

精彩评论

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

关注公众号