I look for something like BluetoothSocket in Android

I tried with CoreBluetooth but its impossible.
How to receive data bluetooth device in swift ?

What Bluetooth protocol are you trying to speak? If it’s Bluetooth LE, Core Bluetooth is your friend. If it’s some other Bluetooth protocol, the answer varies by platform:

  • iOS, tvOS and watchOS have no general-purpose Bluetooth API.

  • macOS has the older IOBluetooth framework.

If you have follow-up questions I strongly recommend that you ask them over on DevForums, making sure to tag your question with either IOBluetooth or Core Bluetooth. The above is about the extent of my Bluetooth knowledge )-:

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

2 Likes

iOS Platform
Bluetooth device using a standard Bluetooth V2.0 or
V2.1 wireless connection.
The standard virtual serial port protocol
to send and receive standard ASCII format serial data

The standard virtual serial port protocol

It sounds like you want RFCOMM. If so, there’s no supported way to do that on iOS.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple