fitomad / NearbyInteraction-Guide

App que acompaña al artículo sobre el framework NearbyInteraction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NSNetServiceBrowser did not search with error dict [{ NSNetServicesErrorCode = "-72008"; NSNetServicesErrorDomain = 10; }].

janksenhu opened this issue · comments

2020-08-29 15:24:18.300441+0800 Cerca[552:34313] [MCNearbyServiceBrowser] NSNetServiceBrowser did not search with error dict [{
NSNetServicesErrorCode = "-72008";
NSNetServicesErrorDomain = 10;
}].
2020-08-29 15:24:18.301515+0800 Cerca[552:34310] [MCNearbyServiceAdvertiser] Server did not publish: errorDict [{
NSNetServicesErrorCode = "-72008";
NSNetServicesErrorDomain = 10;
}].
2020-08-29 15:24:18.302995+0800 Cerca[552:34313] [MCNearbyServiceBrowser] NSNetServiceBrowser did not search with error dict [{
NSNetServicesErrorCode = "-72008";
NSNetServicesErrorDomain = 10;
}].
2020-08-29 15:24:18.304432+0800 Cerca[552:34310] [MCNearbyServiceAdvertiser] Server did not publish: errorDict [{
NSNetServicesErrorCode = "-72008";
NSNetServicesErrorDomain = 10;
}].
2020-08-29 15:24:18.354813+0800 Cerca[552:34169] -[Cerca.CercaViewModel browser:didNotStartBrowsingForPeers:]: unrecognized selector sent to instance 0x2824f4540
2020-08-29 15:24:18.354953+0800 Cerca[552:34169] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Cerca.CercaViewModel browser:didNotStartBrowsingForPeers:]: unrecognized selector sent to instance 0x2824f4540'
*** First throw call stack:
(0x19f4ba5b4 0x1b34aa42c 0x19f3c4a3c 0x19f4bce74 0x19f4bf420 0x1009ffb68 0x100a015f0 0x100a10890 0x19f4371f4 0x19f4313c4 0x19f4304cc 0x1b5e14820 0x1a1dd5a28 0x1a1ddb104 0x1a619232c 0x1a61922b8 0x1a5d0bb08 0x1006a13c4 0x1006a1464 0x19f0f7e60)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Cerca.CercaViewModel browser:didNotStartBrowsingForPeers:]: unrecognized selector sent to instance 0x2824f4540'
terminating with uncaught exception of type NSException
(lldb)

should add bellow code to Info.plist file

<key>NSBonjourServices</key>
<array>
	<string>_desappstrecerca._tcp</string>
	<string>_desappstrecerca._udp</string>
</array>

could resolve above issue

also need add more code to Info.plist file

<key>NSNearbyInteractionAllowOnceUsageDescription</key>
<string>nearby interaction Cerca app with this service</string>
<key>NSLocalNetworkUsageDescription</key>
<string>nearby interaction Cerca app with network usage</string>