Skip to content

ChromeCast discovery doesn't work on iOS 18 #44

@JuroJ

Description

@JuroJ

I'm not able to discover new ChromeCast from iPhone with iOS 18 using GoogleCast (net9.0-ios with DotNet 9.0.102 and Xcode 16.2).
I've tried it with ZeroconfResolver library and discovery works there like a charm.
The problem is in DeviceLocator class which is converting IZeroconfHost into Receiver object. Host representing my ChromeCast has a single Service in dictionary and it doesn't have the name "_googlecast._tcp.local." but the name with id prefix of my ChromeCast device ("[id]_googlecast._tcp.local."). I had to fix CreateReceiver method to search for a service having suffix "_googlecast._tcp.local.":

    private Receiver CreateReceiver(IZeroconfHost host)
    {
        var service = host.Services.Where(pair => pair.Key.EndsWith(PROTOCOL, StringComparison.OrdinalIgnoreCase)).First().Value;
        var properties = service.Properties.First();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions