becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

Upgrade JmDNS to master branch, test #63

Closed emcniece closed 6 years ago

emcniece commented 6 years ago

This plugin currently specifies JmDNS version 3.5.3, and it may benefit from a fix that is currently applied on master branch.

PR https://github.com/jmdns/jmdns/pull/150 may resolve https://github.com/jmdns/jmdns/issues/116 which may in turn resolve several issues here.

I think that we just need to remove the :3.5.3 from https://github.com/becvert/cordova-plugin-zeroconf/blob/master/plugin.xml#L28 but confirming that the app builds with the desired branch of JmDNS might be tricky since Maven dependencies are abstracted through Cordova.

becvert commented 6 years ago

I'll have a look very soon

becvert commented 6 years ago

@emcniece I'm waiting on the results of your testing. If we can benefit from this we'll try to move to the master branch. But I'd rather wait for a JmDNS release. Maybe you could ask for it. Thanks

emcniece commented 6 years ago

I have confirmed that https://github.com/jmdns/jmdns/pull/150 enables scan results while mobile data is active!!

Confirming this was annoying because Cordova translates <framework> tags into Maven repos that require a tag, and the latest Maven-published JmDNS release is 3.5.3 which doesn't have https://github.com/jmdns/jmdns/pull/150. This means that JmDNS needs to be built locally and included (along with its dependencies) as a jar from the gradle file.

I am submitting a release request to get https://github.com/jmdns/jmdns/pull/150 deployed asap. Request: https://github.com/jmdns/jmdns/issues/156

Steps to test:

  1. ionic cordova platform rm android && ionic cordova platform add android
  2. ionic cordova build android
  3. Install Maven (OSX): brew update && brew install maven
  4. Obtain JmDNS: git clone https://github.com/jmdns/jmdns.git /tmp/jmdns
  5. Build JmDNS with Maven: cd /tmp/jmdns/ && mvn clean install
  6. Open Android Studio, open app project, open "File > Project Structure", select "app", open "Dependencies" tab
  7. Add Jar Dependency: /tmp/jmdns/target/jmdns-3.5.4-SNAPSHOT.jar
  8. Add sub-dependencies:
    • Download SLF4J 1.7.25, extract
    • Add Jar Dependency: slf4j-1.7.25/slf4j-api-1.7.25.jar
    • Add Jar Dependency: slf4j-1.7.25/slf4j-simple-1.7.25.jar
  9. "Build > Clean Project"
  10. Run app on mobile device

Resolves:

Potentially resolves:

Related external issues:

emcniece commented 6 years ago

@becvert it looks like the JmDNS release may take a long time, yet users really need the 1.7.2 update for cordova-plugin-add-swift-support. How do you feel about releasing cordova-plugin-zeroconf:1.3.2 with the swift update and moving the JmDNS release to cordova-plugin-zeroconf:1.3.3?

becvert commented 6 years ago

done 👍

emcniece commented 6 years ago

Great, thank you! Updated https://github.com/becvert/cordova-plugin-zeroconf/milestone/1 and https://github.com/becvert/cordova-plugin-zeroconf/milestone/2

kaikreuzer commented 6 years ago

it looks like the JmDNS release may take a long time

But no! 3.5.4 is available since today 🎉