开发者

Trying to find devices on network - iOS5

开发者 https://www.devze.com 2023-04-13 09:09 出处:网络
Not having any luck finding devices. I have tried the following: NSNetServiceBrowser *browser = [[NSNetServiceBrowser alloc] init];

Not having any luck finding devices.

I have tried the following:

 NSNetServiceBrowser *browser = [[NSNetServiceBrowser alloc] init];
    [browser setDelegate:self];
    [browser searchForBrowsableDomains];
    [browser searchForRe开发者_开发技巧gistrationDomains];



- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didFindDomain:(NSString *)domainName moreComing:(BOOL)moreDomainsComing{

    NSLog(@"name %@", domainName);


}
- (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)netServiceBrowser{
    NSLog(@"stopped");   

}

From what I have read, I should be getting a list of devices on the network. It's not doing anything. None of the delegate methods are getting called.

0

精彩评论

暂无评论...
验证码 换一张
取 消