Comments (6)
I implemented the delegate for didNotResolve on the iOS (browsing) side and got this error after timeout:
["NSNetServicesErrorCode": -72007, "NSNetServicesErrorDomain": 10]
Again, services are seen by the browser as being on local., just won't resolve. Thanks in advance!
from netservice.
I cannot reproduce. I have published a service on Linux/RPi using the "dns_sd" branch (avahi). Using the iOS Simulator with the code below, it resolves just fine:
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, NetServiceDelegate {
var window: UIWindow?
var service: NetService?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
service = NetService(domain: "local", type: "_hap._tcp", name: "Thermostaat")
service!.delegate = self
service!.resolve(withTimeout: 5)
return true
}
func netServiceWillResolve(_ sender: NetService) {
NSLog("Will resolve \(sender)")
}
func netServiceDidResolveAddress(_ sender: NetService) {
NSLog("Did resolve \(sender)")
}
func netService(_ sender: NetService, didNotResolve errorDict: [String : NSNumber]) {
NSLog("Did not resolve \(sender), \(errorDict)")
}
}
Outputs:
2018-12-10 23:17:57.177481+0100 NetServiceTest[44651:2111090] Will resolve <NSNetService 0x60000041aca0> local _hap._tcp Thermostaat -1
2018-12-10 23:17:57.217197+0100 NetServiceTest[44651:2111090] Did resolve <NSNetService 0x60000041aca0> local _hap._tcp Thermostaat 39031
from netservice.
Still trying to figure this out. Two questions. Is the specification of the domain above as "local" rather than "local." (with a period suffix) a typo or should I be using "local"? Apart from modifying the hostname to include the local domain (in my case, that makes the hostname "ubuntu.local"), are there any configuration changes on the linux side? Thanks!
from netservice.
BTW, I'm using "master" not "dns_sd" because the later does not compile - errors about "dns_sd.h" not being found.
from netservice.
Another data point:
When I run "avahi-browse _vmc._tcp. --resolve --verbose" from my raspberry to my ubuntu VM (running bridged networking) I also get a failure to resolve, with this error information (which isn't very helpful):
Server version: avahi 0.6.32-rc; Host name: ubuntu.local
E Ifce Prot Name Type Domain
+ ens33 IPv4 Virtual Mobile Controller _vmc._tcp local
Failed to resolve service 'Virtual Mobile Controller' of type '_vmc._tcp' in domain 'local': Timeout reached
: All for now
: Cache exhausted
In contrast, the command does resolve when going from Ubuntu to macOS (which is running Apple's NetService).
from netservice.
iOS client is now resolving thanks to switching to "dns_sd" branch.
from netservice.
Related Issues (20)
- Compilation error HOT 5
- Example code allows port set to 0, but precondition in publishPhaseTwo requires port > 0 HOT 2
- dns_sd branch does not build HOT 2
- Warning and no NetService callbacks after publishing service HOT 4
- Disabled didAcceptConnectionWith in the "dns_sd" branch HOT 10
- Packaging as a library with a branch dependency HOT 2
- NetService publishing error -65540 HOT 3
- Browsing readiness HOT 2
- Segmentation fault HOT 4
- Migrate to proper CLI library / roll custom implementation HOT 1
- Compile error on Linux HOT 2
- New info.plist requirement for browsing services: NSBonjourServices HOT 3
- Re-implement in "pure" Swift? HOT 2
- Linux-based client will not resolve service HOT 13
- iOS 14 support HOT 1
- Build failure when packaged with BlueSocket HOT 8
- Bouke NetService on Windows HOT 1
- NetService not working on swift Docker Official Image HOT 3
- SegFault on resolution of service address.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netservice.