Giter VIP home page Giter VIP logo

ssdpdiscovery-example's Introduction

Build Status Swift Twitter: @wibosco

SSDPDiscovery-Example

A Swift example project on how to use SSDP to discover services on the network as shown in this article - https://williamboles.com/discovering-whats-out-there-with-ssdp/

iOS 14 introduced a range of privacy features, one of which was to limit an app access to the local network. Especially if that app is attempting to discover what is on that network using multicasting (which is exactly what this example project is demonstrating). As such, in order to run this example on a device you will need to request that the com.apple.developer.networking.multicast entitlement is enabled from Apple (the example works on the simulator without the entitlement being enabled). See this note for more details.

ssdpdiscovery-example's People

Contributors

wibosco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssdpdiscovery-example's Issues

Cannot discover any devices in the network

Hey. I am a newbie and now trying to comprehend how SSDP works. Cloned your project and built on simulator, but it eventually never finds any device and ends up with such logs. I have not changed anything in the code, only cloned and installed the pods. Any ideas what I'm doing wrong? Thanks a lot in advance

Screenshot 2023-10-12 at 18 44 22

iOS16 issue

This does not work anymore on iOS16 devices (but works on simulator).
Got this error : Encountered socket error:
The operation couldn’t be completed. (SSDP_Example.UDPSocketError error 0.)

Any ideas?

Question - How are out of order SSDP message handled?

I read your in-depth article on SSDP on your blog but I have a question, what is the suggested policy for dealing with a situation whereby a device is already online as our app starts up and:

  1. It passively announced itself at time T = 0.
  2. App starts at time T = 10. (So never saw 1.)
  3. App probes for devices at time T = 20.
  4. Device responds to probe at time T = 21 - alive msg
  5. Device goes offline right afterwards, at time T = 22 - byebye msg
  6. App sees the byebye before it sees the alive.
  7. App see the alive after it sees the byebye

App thinks the device online but it is not.

Is it sensible to ignore byebye until after we've received an actively probed alive msg?

I've done SSDP and UPnP work some years ago for .Net and I'm just thinking of resuming this when this question came up!

Thanks

Socket Error on certain devices

Hi William,

Thank you for the project and the awesome blog post!

I've encountered an error while testing the example.

I was only able to get it working on an iPhone SE with iOS 14.4

On both iPad Air 4 with iOS 14.6 and iPhone XS Max with iOS 14.5.1 I get the following error:
SSDP-Example[402:7547] Encountered socket error: The operation couldn’t be completed. (SSDP_Example.UDPSocketError error 0.)

I added the Local Network Usage Description and disabled App Transport Security.

Any ideas why the error is occurring?

Thank you
Tiago

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.