c++ - Qt Bluetooth on iOS -
i tried search answer query. seems trivial, cant find answer yet.
i trying run program using qt bluetooth on ios. able use on macos.
but basic feature of code :
qbluetoothlocaldevice localdevice; qstring localdevicename; // check if bluetooth available on device if (localdevice.isvalid()) { // turn bluetooth on localdevice.poweron(); // read local device name localdevicename = localdevice.name(); // make visible others localdevice.sethostmode(qbluetoothlocaldevice::hostdiscoverable); // connected devices qlist<qbluetoothaddress> remotes; remotes = localdevice.connecteddevices(); ui->textbrowser->settext(localdevice.name() + "\n" + localdevice.address().tostring()); }
gives me null vector address.
is there specific settings needed run in ios. need add flags on info.plist file? kindly suggest.
for information, using qt 5.7 , xcode 8, programming on macos sierra macbook , building ios10.
as pointed out paulw11, indeed, possible use bluetooth low energy version on ios devices.
although not mentioned in qt documentation, recommend try program ios device ble central device communicates peripheral device.
many paulw11 input.
Comments
Post a Comment