diff options
-rw-r--r-- | core/libdivecomputer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 47b261b7b..a35c0f908 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1383,7 +1383,12 @@ dc_status_t divecomputer_device_open(device_data_t *data) #ifdef BT_SUPPORT if (transports & DC_TRANSPORT_BLUETOOTH) { dev_info(data, "Opening rfcomm stream %s", data->devname); +#if defined(__ANDROID__) || defined(__APPLE__) + // we don't have BT on iOS in the first place, so this is for Android and macOS + rc = rfcomm_stream_open(&data->iostream, context, data->devname); +#else rc = bluetooth_device_open(&data->iostream, context, data); +#endif if (rc == DC_STATUS_SUCCESS) return rc; } |