Cannot start scan on iOS14
RyQuantum opened this issue · comments
Ryan Ma commented
Dennis Snijder commented
Make sure you specificy the service you're scanning for.
https://github.com/balthazar/react-native-zeroconf#ios-14-permissions
Ryan Ma commented
Ilya Lezhnev commented
The same issue. Is there a solution? My ios app have been crashed on .scan() method.
Calin Bodnar commented
@ilyalezhnev @mayue3434 Make sure the Bonjour service in the plist is an actual service, as in _your-bonjour-service._tcp -> this works for me.
Stephen Lacy commented
In my case I was searching for an Arduino service. My values on iOS 14:
Info.plist
<key>NSBonjourServices</key>
<array>
<string>_arduino._tcp.</string>
</array>
Scan:
zeroconf.scan('arduino', 'tcp') // _arduino._tcp
Ryan Ma commented
You inspire me. I modify my code to:
Info.plist
<key>NSBonjourServices</key>
<array>
<string>_http._tcp.</string>
</array>
js code:
zeroconf.scan('http', 'tcp')
It works. Thank you all so much.