근처에있는 모든 블루투스 장치를 검색하고 ID를 가져와야합니다. 나는 쌍을 이룰 필요가 없다. 나는 아이폰 2.3 베타를 사용하고있다.근처에있는 블루투스 장치 목록 가져 오기
GameKit을 사용해 보았습니다. 아무리 행운을 빌어도이 방법을 알고 있습니다.
BOOL result = NO;
if (!session) {
session = [[GKSession alloc] initWithSessionID:@"SCANNER"
displayName:nil
sessionMode:GKSessionModePeer];
self.session.delegate = self;
[self.session setDataReceiveHandler:self withContext:nil];
self.session.available = YES;
result = YES;
}
[self.session setDataReceiveHandler : self withContext : nil]; 다음과 같은 오류
Scanner[42754:207] Error: 30500 -- Invalid parameter for -setDataReceiveHandler:withContext:.
와
는 ~ DNSServiceRegister callback: Ref=471fa40, Flags=2, ErrorType=0 name=00rusor1A..iPhone Simulator regtype=_q1eu29voete9jf._udp. domain=local.
건배 brad. 네, 그걸 시뮬레이션 할 수는 없어요. 나는 가능한 한 많은 사람들이 완벽 할 필요는 없다는 것을 모두 감지 할 필요가 없다. Bonjor를 사용하여 모든 블루투스를 감지하는 방법은 무엇입니까? –
Bonjour는 iPhone의 네트워크 유형을 구분하지 않으므로 사용 가능한 모든 네트워크 (Bluetooth, WiFi 또는 기타)에서 모든 Bonjour 응답 장치를 간단히보고합니다. Wi-Fi 및 셀룰러 인터페이스를 종료하지 않고 Bluetooth 장치 만 반환 할 수있는 방법은 없습니다. 또한 Bluetooth 장치가 거의없는 Bonjour 장치 만 찾습니다. NSNetServices 및 CFNetServices 프로그래밍 안내서 : http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/BrowsingForServices.html#//apple_ref/doc/uid/20001077을 참조하십시오. –