How to determine if the connection is Bluetooth or WiFi with the iPhone?

I am creating a connection using bonjour support between two iphones.

I connect using

CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault,
(CFStringRef)netService.hostName, netService.port, &readStream, &writeStream);

But I can’t understand how I can determine if the Bluetooth connection is connected or not. Is there a way to determine the IP address ... that should do this.

I believe it’s important to follow the Apple Human Interface Guidelines because if the connection is connected to WiFi, I need to update the network activity indicator from the status bar from time to time, but it seems like it can be misleading if I use this indicator in Bluetooth connection. (The indicator is located next to the Wi-Fi connection, and not with bluetooth).

thank

+3
source share
1 answer

. , , IP-. Bluetooth 169.254.x.x. , .

+1

Source: https://habr.com/ru/post/1785809/


All Articles