更新された到達可能性ライブラリを使用して、インターネット接続が到達可能かどうかをテストしています。インターネットに接続できない場合に備えてメッセージをログに記録しようとしましたが、ログがデバッグされません。
//Test the internet connection
Reachability* reach = [Reachability reachabilityForInternetConnection];
reach.unreachableBlock = ^(Reachability*reach)
{
NSLog(@"Internet connexion unreachable");//Although Internet cnx is off, this message is not displayed
return;
};
// start the notifier which will cause the reachability object to retain itself!
[reach startNotifier];
到達可能性ライブラリを誤解していますか? インターネットがオフのときに特定のタスクを実行する方法は? ありがとう。
PS: 私の iPad は Wi-Fi のみで、3G サービスはありません。