Iphone GameKit WiFi可以在模拟器上工作,但不能在设备上工作

Iphone GameKit WiFi可以在模拟器上工作,但不能在设备上工作,iphone,wifi,p2p,gamekit,gksession,Iphone,Wifi,P2p,Gamekit,Gksession,在使用GameKit时,我遇到了一个无法解释的问题。通过WiFi picker建立连接时。connectionTypesMask=GKPeerPickerConnectionTypeOnline;设备无法相互看到。他们什么也看不见,而模拟器可以看到一切,它可以看到任何设备或模拟器在不同的机器上工作。几天来,我一直在绞尽脑汁想弄明白为什么它能在模拟器上工作,而不能在设备上工作。有人能帮我吗 这就是我创建会话的方式 if (type == GKPeerPickerConnectionTypeOnl

在使用GameKit时,我遇到了一个无法解释的问题。通过WiFi picker建立连接时。connectionTypesMask=GKPeerPickerConnectionTypeOnline;设备无法相互看到。他们什么也看不见,而模拟器可以看到一切,它可以看到任何设备或模拟器在不同的机器上工作。几天来,我一直在绞尽脑汁想弄明白为什么它能在模拟器上工作,而不能在设备上工作。有人能帮我吗

这就是我创建会话的方式

 if (type == GKPeerPickerConnectionTypeOnline) 
{
    picker.delegate = nil;
    [picker dismiss];
    [picker autorelease];

    [alert setTitle:@"\n\n\n"];
    [alert setMessage:@"Looking for other iPads, iPhones or iPod touches..."];
    [alert addButtonWithTitle:@"Cancel"];

    UIActivityIndicatorView *progress   = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 50, 30, 30)];
    progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
    [alert addSubview:progress];
    [progress startAnimating];
    [alert show];

    self.gameSession = [[GKSession alloc] initWithSessionID:kSessionID displayName:nil sessionMode:GKSessionModePeer];
    self.gameSession.available = YES;
    self.gameSession.delegate = self;
    self.gameSession.disconnectTimeout = 0;
    [self.gameSession setDataReceiveHandler:self withContext:nil];
}

你开始工作了吗。我有3台设备。谁不能用wifi互相搜索,丁烷更新?我也有同样的问题。不过,它似乎只出现在一些网络上。我有一种感觉,这可能与使用的端口有关?你开始工作了吗。我有3台设备。谁不能用wifi互相搜索,丁烷更新?我也有同样的问题。不过,它似乎只出现在一些网络上。我有一种感觉,它可能与使用的端口有关?