I'm relatively new in iOS development.
I want to make a cross-platform Bluetooth app, in Android, I use RFCOMM to send custom data, like strings. When I googled 'iOS Bluetooth', I've found the Core Bluetooth
framework in the results, it seems to be made for low-energy connections. I only want to use RFCOMM instead of other profiles because of two reasons:
- I use RFCOMM to send custom data, like strings.
- I want my app to be able to connect with non-apple devices.
Is it even possible to use RFCOMM in iOS? If not, are there any workarounds to connect with non-apple devices?
no, 'core bluetooth' on ios only supports BLE devices and only on a rather high level. there is only one specific profile being offered (GATT)
Now if you want RFCCOMM (part of SPP) you might be able to leverage the 'External Accessory' framework BUT you can only use only your app with a your device (as in: you manufactured it and now wrote an app to use it). You would also need a license from apple so ....... not really an option
RFCOMM is part of the protocol stack and drives HSP and HFP. A simple SPP based application is also backed by RFCOMM. Your application should be okay with SPP implementation. The lower stack layer RFCOMM may not be directly exposed to third party app developers.
来源:https://stackoverflow.com/questions/49075775/is-it-possible-use-rfcomm-in-ios