Skip to content

Commit 9a34cb9

Browse files
committed
Bluetooth (macOS): normalize mac address strings
1 parent ef974ef commit 9a34cb9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/detection/bluetooth/bluetooth_apple.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ @interface IOBluetoothDevice()
2121
FFBluetoothResult* device = ffListAdd(devices);
2222
ffStrbufInitS(&device->name, ioDevice.name.UTF8String);
2323
ffStrbufInitS(&device->address, ioDevice.addressString.UTF8String);
24+
ffStrbufReplaceAllC(&device->address, '-', ':');
25+
ffStrbufUpperCase(&device->address);
2426
ffStrbufInit(&device->type);
2527

2628
if (ioDevice.batteryPercentSingle)

src/util/apple/Info.plist.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
<string>@PROJECT_VERSION@</string>
1111
<key>CFBundleDevelopmentRegion</key>
1212
<string>English</string>
13+
<key>NSBluetoothAlwaysUsageDescription</key>
14+
<string>For detecting Bluetooth devices</string>
1315
</dict>
1416
</plist>

0 commit comments

Comments
 (0)