Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add desktop support macOS #11

Closed
sebastianhaberey opened this issue Aug 26, 2021 · 8 comments
Closed

Add desktop support macOS #11

sebastianhaberey opened this issue Aug 26, 2021 · 8 comments
Milestone

Comments

@sebastianhaberey
Copy link

Great, this is exactly what I was looking for 👍 The code seems short and succinct, so that's good. Do you have any plans to support deskop platforms?

@Nimrodda
Copy link
Owner

Nimrodda commented Aug 26, 2021 via email

@sebastianhaberey
Copy link
Author

Yes I feel you, I'm also pretty much going by project requirements. Still, I can't promise anything, but if I come up with something for the macOS side of things, I'll get back to you.

@sebastianhaberey
Copy link
Author

So here's a PR where I updated the project for macOS and then basically copied the iOS Swift code. The NSD API seems to be similar (equivalent?) on both platforms. I was able to detect my printer, so the basics seem to be working.

@jnstahl
Copy link
Contributor

jnstahl commented Nov 18, 2021

Hi,

I am using your plugin on android/ios (thank you very much) but I also need the windows / macos part. Can contribute to windows. I am pretty versed in flutter/android/windows but relatively new to these plugins.

@Nimrodda
Copy link
Owner

@jnstahl macos support is already available but not yet released. It'd be great if you can contribute the Windows implementation.

@jnstahl
Copy link
Contributor

jnstahl commented Nov 19, 2021

@Nimrodda OK on it. I already got it working in principle (my own flutter app is now running on windows and can discover and connect to the server); some caveats:

  • for UWP apps there is an actual windows API, but for now I am doing the WIN32 implementation
  • in WIN32 there is no API for MDNS, so I had to resort to a public domain solution based on raw sockets
  • The platform documentation for the WIN32 plugins is fairly sparse, it took a bit of trial and error to make it work
  • The biggest issue right now is that the MDNS code is essentially blocking the main thread while it waits for a response which is not acceptable. the next step is to make it either multithreaded or non-blocking. That might be some heavy lifting. I keep you posted.

@Nimrodda
Copy link
Owner

Sounds good, thanks!

@Nimrodda
Copy link
Owner

@jnstahl I created a dedicated issue for Windows support #15 . Closing this one.

@Nimrodda Nimrodda added this to the 1.3.0 milestone Nov 23, 2021
@Nimrodda Nimrodda changed the title Desktop support (macOS, Windows) Add desktop support macOS Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants