IOS and Bluetooth

Hi,

I need to access data on IOS device to receive data through bluetooth.

Is it possible with Xojo?

How can I access the bluetooth connection?

Thanks!

Possible probably. Easy no. You’ll face issues from functions being called on non-Xojo threads. I recommend you use a different tool

Thanks Jason.

Will follow your advice.

and don’t forget that bluetooth on iOS is VERY restricted. even with adapted tools, you won’t be able to query anything you want.

how so? I have experimented with simple BT apps in Swift which was quite easy… but what type of restrictions are you inferring?

the restrictions are mainly on the device side: they must be MFI, Made For iOS, or they won’t be seen by the iOS device.

Yet, we are here, again, facing limitations that should not exist. Don’t get me started…

I can only hope someone at Xojo understands that you cannot both be late to the mobile party, and endlessly find excuses for not providing features considered normal in any iOS or Android app today. Like printing wirelessly, or accessing Bluetooth. The “we know best” attitude already ended in so many Xojo advocates leaving the boat in favor of more adult solutions.

If only a valid way of bringing new features to the tool was provided. Like plugins, dynamic libraries, or whatever is possible. Christian could probably work his magic.

On Android, that will be super critical. Not only because Xojo will come after all the other guys, but also because as far as I understand, they have chosen to part with Java. Instead of being able to tap directly into the Android development kit, once again declares could be the only way. Alas, poor Yorick, the public is not so forgiving anymore…

Really? I have not had to work with BT on iOS yet, but when I use an app like LightBlue on my iPhone to discover nearby BTLE devices, it shows some that I really doubt are MFi certified. Such as some Kickstarter campaign items. But perhaps they are…

you can see them, but you can’t connect to them.

[quote=455995:@Michel Bujardet]Yet, we are here, again, facing limitations that should not exist. Don’t get me started…

I can only hope someone at Xojo understands that you cannot both be late to the mobile party, and endlessly find excuses for not providing features considered normal in any iOS or Android app today. Like printing wirelessly, or accessing Bluetooth. The “we know best” attitude already ended in so many Xojo advocates leaving the boat in favor of more adult solutions.

If only a valid way of bringing new features to the tool was provided. Like plugins, dynamic libraries, or whatever is possible. Christian could probably work his magic.

On Android, that will be super critical. Not only because Xojo will come after all the other guys, but also because as far as I understand, they have chosen to part with Java. Instead of being able to tap directly into the Android development kit, once again declares could be the only way. Alas, poor Yorick, the public is not so forgiving anymore…[/quote]

I didn’t want to start a polemic :wink: … Nevertheless, I wish I could use Xojo for my mobile projects which has not been possible yet because of the limitations it still has. I don’t want to trash a project because new features can’t be implemented due to an incomplete framework…

We have already worked with the Ionic framework. I’ll start there and see…

BTW, thanks to everyone for participating to the discussion.

The LightBlue LE app (among others, but it is my favorite) not only lists them, but can interrogate them for services offered, show the “Advertisement Data” and various other properties and descriptors. And while doing so reports “Connected” – but this is not to say it is paired and showing up in the iOS Settings > Bluetooth list.

Whether or not this is relevant, if what is at issue here are BTLE devices which cannot connect to iOS without MFi certification, that part is a device issue on the supplier side, and not a Xojo issue. Which is not to say that using BTLE from Xojo for devices that are MFi certified may not be problematic.

In theory, won’t Interops for iOS help once available?

Interops as still a while away, according to the roadmap.

But if they are, as I suspect, glorified declares, they may yet prove inadequate in circumstances where a delegate is necessary. Or even when a call back must be used. The latter being common in communication settings.

The better mousetrap would be some way to tap into a dynamic or static library. Whichever is allowed allowed for iOS, so a third party developer could provide additional features, the way plugins currently do it for Desktop. Or even that plugins could actually be used with Xojo iOS.

I don’t think that’s true. I’ve used a few different BLE RF transceiver modules as "transparent UART"s to talk to iOS; I don’t believe they are iOS-specific in any way. Bluetooth is Bluetooth.

may be this has changed, or the BLE is not concerned with it.
but I can’t connect to 2 bluetooth gps, and I can connect to only one that is MFI certified for example.

[quote=456055:@Jean-Yves Pochez]may be this has changed, or the BLE is not concerned with it.
but I can’t connect to 2 bluetooth gps, and I can connect to only one that is MFI certified for example.[/quote]
Probably I am working at a lower level. Using CoreBluetooth (in Swift), I create a CBPeripheral object, scan for services and characteristics, check UUID etc, handle the didUpdateValueFor event to receive data and use the writeValue method to transmit.

again, BLE is different from “normal” bluetooth. don’t know if the MFI restrictions applies also to BLE.