flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

Implement macOS support

Open juliansteenbakker opened this issue 2 years ago • 3 comments

#112 & #243

This is still a WIP, but for now scanning and discovering works!

Normally it would be the easiest to symlink the iOS code instead of duplicating it, however this is not possible because of the federated structure.

After some first tests it seems like connecting to a device is crashing somewhere.

I'm making this PR public so that maybe other people can chime in and help improving macOS support.

juliansteenbakker avatar Oct 05 '21 08:10 juliansteenbakker

This also needs some changes to reactive_ble_mobile package, so to get this to work locally you need to declare all package imports with path in pubspec.yaml like so:

  reactive_ble_platform_interface:
    path: ../reactive_ble_platform_interface

juliansteenbakker avatar Oct 05 '21 08:10 juliansteenbakker

@juliansteenbakker first of all thank you for your contribution. I will look at it more thoroughly later this week. I am not super happy about the code duplication, I think we should avoid this. What if we extract g the swift code out into its own package called reactive_ble_swift? Do you think symlink will work then? Else I was thinking we can publish the swift implementation in a cocoa pod (however this always feels a bit of black magic to me). What are you thoughts?

@werediver can you also shine your light at this approach?

remonh87 avatar Oct 05 '21 11:10 remonh87

I am not super happy about the code duplication, I think we should avoid this.

Me neither.. I'm looking into some other options right now and update if i know more.

juliansteenbakker avatar Oct 05 '21 11:10 juliansteenbakker

I will close this one since it is not active for a year now! feel free to open it again!

Taym95 avatar Dec 12 '22 11:12 Taym95