インターネットに接続していない場合にユーザーに警告したいときにこのエラーが発生します
私を助けてください、これが私のコードです:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
__block UIAlertView *alert = nil;
//---------- Check Connection -------
// allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// set the blocks
reach.unreachableBlock = ^(Reachability*reach) // not connected
{
//NSLog(@"UNREACHABLE!");
alert =
[[UIAlertView alloc]
initWithTitle: @"No Network Connection!"
message:@"Sorry, we can't currently connect you to the app. Please check your internet connection."
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
//[alert release];
};
reach.reachableBlock = ^(Reachability*reach)
{
//NSLog(@"REACHABLE!");
};
// start the notifier which will cause the reachability object to retain itself!
[reach startNotifier];
}
エラーは「wait_fences:応答の受信に失敗しました:10004003」です。何か提案はありますか?