Ionic Native: ZeroConf not working on IOS











up vote
0
down vote

favorite












So I made the App with a Android Device in the development Process and everything worked fine like it should. Then I tried building it for IOS and nothing worked I just got a white screen. So I made a test app which just the ZeroConf Plugin in it and fetching something completely simple.



zeroconf.watch('_scanassist._tcp.', 'local.').subscribe(result => {
console.log('SOMETHING WAS FOUND!')
alert('SOMETHING WAS FOUND')
});


Just tested it on Android and everything worked like usually but when on IOS it does not. I execute this code in the constructor on my main page, could that be the problem? After that I put it in a setTimeout and the side loaded but Zeroconf did not give me an alert even it should give me one.



Link to Ionic Native Page: https://ionicframework.com/docs/native/zeroconf/










share|improve this question


























    up vote
    0
    down vote

    favorite












    So I made the App with a Android Device in the development Process and everything worked fine like it should. Then I tried building it for IOS and nothing worked I just got a white screen. So I made a test app which just the ZeroConf Plugin in it and fetching something completely simple.



    zeroconf.watch('_scanassist._tcp.', 'local.').subscribe(result => {
    console.log('SOMETHING WAS FOUND!')
    alert('SOMETHING WAS FOUND')
    });


    Just tested it on Android and everything worked like usually but when on IOS it does not. I execute this code in the constructor on my main page, could that be the problem? After that I put it in a setTimeout and the side loaded but Zeroconf did not give me an alert even it should give me one.



    Link to Ionic Native Page: https://ionicframework.com/docs/native/zeroconf/










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      So I made the App with a Android Device in the development Process and everything worked fine like it should. Then I tried building it for IOS and nothing worked I just got a white screen. So I made a test app which just the ZeroConf Plugin in it and fetching something completely simple.



      zeroconf.watch('_scanassist._tcp.', 'local.').subscribe(result => {
      console.log('SOMETHING WAS FOUND!')
      alert('SOMETHING WAS FOUND')
      });


      Just tested it on Android and everything worked like usually but when on IOS it does not. I execute this code in the constructor on my main page, could that be the problem? After that I put it in a setTimeout and the side loaded but Zeroconf did not give me an alert even it should give me one.



      Link to Ionic Native Page: https://ionicframework.com/docs/native/zeroconf/










      share|improve this question













      So I made the App with a Android Device in the development Process and everything worked fine like it should. Then I tried building it for IOS and nothing worked I just got a white screen. So I made a test app which just the ZeroConf Plugin in it and fetching something completely simple.



      zeroconf.watch('_scanassist._tcp.', 'local.').subscribe(result => {
      console.log('SOMETHING WAS FOUND!')
      alert('SOMETHING WAS FOUND')
      });


      Just tested it on Android and everything worked like usually but when on IOS it does not. I execute this code in the constructor on my main page, could that be the problem? After that I put it in a setTimeout and the side loaded but Zeroconf did not give me an alert even it should give me one.



      Link to Ionic Native Page: https://ionicframework.com/docs/native/zeroconf/







      ionic-framework native mdns zeroconf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 16:47









      Yonathan

      12




      12
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I've not used Ionic ZeroConf but have had quite a few issues with https://github.com/balthazar/react-native-zeroconf and ios.



          We were unable to discover MDNS services on iOS with react-native-zeroconf, however, after performing a scan via Fing (iOS app) we were able to discover and resolve successfully again with react-native-zeroconf.



          I suspect this has something to do with the way ios caches MDNS records. ZeroConf does not seem to be able to flush outdated MDNS records on scan.



          We ended up ditching ZeroConf on ios because it was notoriously unreliable and instead used customed .local address for ios.



          We are still using ZeroConf on Android without issue.






          share|improve this answer





















          • Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
            – Yonathan
            Nov 22 at 17:16










          • You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
            – Laurie Williams
            Nov 22 at 17:46












          • Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
            – Yonathan
            Nov 22 at 20:26











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435324%2fionic-native-zeroconf-not-working-on-ios%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          I've not used Ionic ZeroConf but have had quite a few issues with https://github.com/balthazar/react-native-zeroconf and ios.



          We were unable to discover MDNS services on iOS with react-native-zeroconf, however, after performing a scan via Fing (iOS app) we were able to discover and resolve successfully again with react-native-zeroconf.



          I suspect this has something to do with the way ios caches MDNS records. ZeroConf does not seem to be able to flush outdated MDNS records on scan.



          We ended up ditching ZeroConf on ios because it was notoriously unreliable and instead used customed .local address for ios.



          We are still using ZeroConf on Android without issue.






          share|improve this answer





















          • Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
            – Yonathan
            Nov 22 at 17:16










          • You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
            – Laurie Williams
            Nov 22 at 17:46












          • Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
            – Yonathan
            Nov 22 at 20:26















          up vote
          0
          down vote













          I've not used Ionic ZeroConf but have had quite a few issues with https://github.com/balthazar/react-native-zeroconf and ios.



          We were unable to discover MDNS services on iOS with react-native-zeroconf, however, after performing a scan via Fing (iOS app) we were able to discover and resolve successfully again with react-native-zeroconf.



          I suspect this has something to do with the way ios caches MDNS records. ZeroConf does not seem to be able to flush outdated MDNS records on scan.



          We ended up ditching ZeroConf on ios because it was notoriously unreliable and instead used customed .local address for ios.



          We are still using ZeroConf on Android without issue.






          share|improve this answer





















          • Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
            – Yonathan
            Nov 22 at 17:16










          • You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
            – Laurie Williams
            Nov 22 at 17:46












          • Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
            – Yonathan
            Nov 22 at 20:26













          up vote
          0
          down vote










          up vote
          0
          down vote









          I've not used Ionic ZeroConf but have had quite a few issues with https://github.com/balthazar/react-native-zeroconf and ios.



          We were unable to discover MDNS services on iOS with react-native-zeroconf, however, after performing a scan via Fing (iOS app) we were able to discover and resolve successfully again with react-native-zeroconf.



          I suspect this has something to do with the way ios caches MDNS records. ZeroConf does not seem to be able to flush outdated MDNS records on scan.



          We ended up ditching ZeroConf on ios because it was notoriously unreliable and instead used customed .local address for ios.



          We are still using ZeroConf on Android without issue.






          share|improve this answer












          I've not used Ionic ZeroConf but have had quite a few issues with https://github.com/balthazar/react-native-zeroconf and ios.



          We were unable to discover MDNS services on iOS with react-native-zeroconf, however, after performing a scan via Fing (iOS app) we were able to discover and resolve successfully again with react-native-zeroconf.



          I suspect this has something to do with the way ios caches MDNS records. ZeroConf does not seem to be able to flush outdated MDNS records on scan.



          We ended up ditching ZeroConf on ios because it was notoriously unreliable and instead used customed .local address for ios.



          We are still using ZeroConf on Android without issue.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 17:03









          Laurie Williams

          28317




          28317












          • Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
            – Yonathan
            Nov 22 at 17:16










          • You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
            – Laurie Williams
            Nov 22 at 17:46












          • Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
            – Yonathan
            Nov 22 at 20:26


















          • Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
            – Yonathan
            Nov 22 at 17:16










          • You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
            – Laurie Williams
            Nov 22 at 17:46












          • Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
            – Yonathan
            Nov 22 at 20:26
















          Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
          – Yonathan
          Nov 22 at 17:16




          Thanks for this awesome answer! But what do you mean by custom .local dresses and how could I implement it in my app?
          – Yonathan
          Nov 22 at 17:16












          You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
          – Laurie Williams
          Nov 22 at 17:46






          You're welcome. Well, we have our own iot devices which broadcast as custom service but you can use any .local address on your network. If you can find the name of the service you're trying to connect to, you can return it as a .local address. For example, My-MacBook-Pro.local should resolve to the IP address to something like 192.168.88.206 on ios. So instead of running the scan with ZeroConf, you just return ( MYDEVICENAME.local:1884 ) Hope that helps.
          – Laurie Williams
          Nov 22 at 17:46














          Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
          – Yonathan
          Nov 22 at 20:26




          Thanks for the answer again. For some strange reason the Libary on the other end (npmjs.com/package/bonjour) did not support mDns which will be used on IOS and not on Android so that was the key difference between them. So I switched to mDns(npmjs.com/package/mdns) for IOS
          – Yonathan
          Nov 22 at 20:26


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435324%2fionic-native-zeroconf-not-working-on-ios%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          What visual should I use to simply compare current year value vs last year in Power BI desktop

          Alexandru Averescu

          Trompette piccolo