Determining when an EDGE connection comes back after a dropout on an iPhone

后端 未结 2 358
终归单人心
终归单人心 2021-01-31 00:33

I\'ve incorporated Apple\'s Reachability sample into my own project so I know whether or not I have a network connection - if I don\'t have a network connection, I don\'t bother

2条回答
  •  醉酒成梦
    2021-01-31 01:06

    There is a nice reachability example on the net. it works wonderfully well: http://servin.com/iphone/iPhone-Network-Status.html

    But you see, when I try to use it my own way, it just bombs.

    Tried to implement it using:

    NSString *sCellNetwork;     
     NSString *sNetworkReachable;  
    
    if (flags & kSCNetworkFlagsReachable || flags & kSCNetworkReachabilityFlagsIsWWAN)
    
    {do it} 
    
     else {
       Network fail alert; 
    }
    

提交回复
热议问题