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

iOS: onDiscoveryStartFailed #16

Closed
robert-virkus opened this issue Apr 25, 2022 · 3 comments
Closed

iOS: onDiscoveryStartFailed #16

robert-virkus opened this issue Apr 25, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@robert-virkus
Copy link

Hi, is there anything I need to set up on iOS for being able to start scanning?

My code:

nsd.enableLogging(nsd.LogTopic.calls);
nsd.enableLogging(nsd.LogTopic.errors);
nsd.startDiscovery('_ds-prov._tcp').then((discovery) {
// ...
});

log output:

[MethodChannelNsdPlatform] [2022-04-25 16:50:18.712895] [calls] Call: startDiscovery {handle: d4dd15f0-6bf0-4e4f-9ba3-bf789c808402, service.type: _ds-prov._tcp}
[MethodChannelNsdPlatform] [2022-04-25 16:50:18.731574] [calls] Callback: onDiscoveryStartFailed {handle: d4dd15f0-6bf0-4e4f-9ba3-bf789c808402}

The same code works fine on Android, on iOS I receive the above log output: onDiscoveryStartFailed.

Many thanks in advance and thanks for your cool nsd library!

@robert-virkus
Copy link
Author

I was missing the following settings in my Info.plist file:

<key>NSLocalNetworkUsageDescription</key>
<string>To discover network devices via mDNS</string>
<key>NSBonjourServices</key>
<array>
	<string>_ds-prov._tcp</string>
</array>

It would be useful to mention this in your readme (not with this specific service type, of course).

Thanks again for your library!

@sebastianhaberey
Copy link
Owner

Yes, you're absolutely right, I'll add this to the README.

@sebastianhaberey
Copy link
Owner

I've updated the documentation and put the permission chapter in a more prominent place. Also, I added the permissions to the iOS version of the example app. Tests are green and the new version is out (1.5.0) so I'm closing this. Thank you for your contribution 🙂

@sebastianhaberey sebastianhaberey added the documentation Improvements or additions to documentation label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants