- (BOOL)isCellNetwork{

struct sockaddr_in zeroAddr;

bzero(&zeroAddr, sizeof(zeroAddr));

zeroAddr.sin_len = sizeof(zeroAddr);

zeroAddr.sin_family = AF_INET;

SCNetworkReachabilityRef target = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr*)&zeroAddr);

SCNetworkReachabilityFlags flag;

SCNetworkReachabilityGetFlags(target, &flag);

if(flag & kSCNetworkReachabilityFlagsIsWWAN){

return YES;

}else{

return NO;

}

}

'Tips & Tech > Objective-C' 카테고리의 다른 글

iPhone Device Network Check(Wi-Fi)  (0) 2012.02.27
문자열  (0) 2012.02.27
xcode4 단축키  (0) 2012.02.27
xcode4 App 등록방법.  (0) 2012.02.27
App Store Review Guidelines[번역]  (0) 2012.02.27

+ Recent posts