0

I would like to know if there is a way to write an app to identify the Bluetooth devices under My Devices on my iPhone. Additionally, I would like to list which devices are currently connected or not.

I have worked a bit with a developer and he claims it is not available in any SDK. I find this difficult to believe.

I know I can scan for all Bluetooth devices near me and I have developed an app to do that but I still want to also list the apps on my phone and their connection status.

Thanks for your time.

L A
  • 873
  • 11
  • 22
Benny
  • 1
  • 1
  • not getting question properly!!! What you want exactly ? list of device in your range with Bluetooth enable? – Ketan Parmar Sep 02 '16 at 13:01
  • I would like to list the BlueTooth devices on my phone under "My Devices" and be able to select one to monitor its connection status. – Benny Sep 02 '16 at 13:05

1 Answers1

0

You can do something like,

  NSArray *connectedAccessories = [[EAAccessoryManager sharedAccessoryManager] connectedAccessories];

For scan you can do,

CBUUID *heartRate = [CBUUID UUIDWithString:@"180D"];


NSDictionary *scanOptions = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:CBCentralManagerScanOptionAllowDuplicatesKey];


[cm scanForPeripheralsWithServices:[NSArray arrayWithObject:heartRate] options:scanOptions]

You can refer This SO Post or This SO Post.

Community
  • 1
  • 1
Ketan Parmar
  • 25,426
  • 9
  • 43
  • 67