Post

Replies

Boosts

Views

Activity

Bluetooth — Peripheral Won't Appear in Bluetooth Settings Menu
Xcode 15.3 macOS Sonoma 14.5 I'm trying to build an app for macOS that will emulate a HID device (keyboard, mouse, game controller) and send those inputs to an IOS device over Bluetooth. I've figured out how to map the inputs from the relevant documentation (Human Interface Device Profile 1.1, Apple Accessory Design Guidelines) but I can't seem to get the Bluetooth services working. I've found an example of how to implement the Bluetooth service (from macOS Mojave but updated to Swift 5). The code will build without issue and asks for the necessary permissions in settings. After giving permissions and rebuilding, the peripheral simply does not appear on the iPhone Bluetooth settings menu (or the Bluetooth settings menu of any device). I suppose the question I'm asking here is if macOS Sonoma prevents the macOS device from advertising as a keyboard peripheral. Furthermore, is there any documentation that describes these limitations. Here is the full example code (too large to post): https://github.com/MonoidMusician/Bluetooth-Keyboard-Emulator/blob/master/Keyboard%20Connect%20Open%20Source/BTKeyboard.swift
1
0
383
Jun ’24