3

我创建了两个 bonjour 服务:(_airplay._tcp.local端口 7000)和_raop._tcp.local(端口 41952)。当我发布这些服务时,它们会按预期显示在 iOS 的控制中心中。但是,当我尝试连接到它们时,airplay 服务失败并出现以下错误:

Jan 11 10:02:18 Jakes-iPhone mediaserverd(CoreUtils)[27] <Notice>: 2017-01-11 10:02:18.217822 AM APTransportTrafficRegistrar: Deregister AirPlay traffic for AWDL at MAC 00:00:00:00:00:00 with target infra non critical PeerIndication=0 err=0
Jan 11 08:58:28 Jakes-iPhone mediaremoted[10160] <Notice>: AirPlay Error: Unknown VADPortStatus: -16612
Jan 11 08:58:28 Jakes-iPhone mediaremoted[10160] <Notice>: VAD port status changed to -16612 for route <private>
Jan 11 08:58:28 Jakes-iPhone mediaremoted[10160] <Notice>: MRMediaRemoteRouteStatus changed to 5 for route <private>
Jan 11 08:58:28 Jakes-iPhone mediaremoted[10160] <Notice>: AirPlay Error 5: <private>: <private>.

日志中的所有内容:

Jan 11 10:01:07 Jakes-iPhone kernel(Sandbox)[0] <Notice>: SandboxViolation: logd(47) deny(1) file-read-data /private/var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMANetworking.framework/AMANetworking
Jan 11 10:01:07 Jakes-iPhone kernel(Sandbox)[0] <Notice>: SandboxViolation: logd(47) deny(1) file-read-data /private/var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAUtils.framework/AMAUtils
Jan 11 10:01:07 Jakes-iPhone kernel(Sandbox)[0] <Notice>: SandboxViolation: logd(47) deny(1) file-read-data /private/var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework/AMAScreenSharing
Jan 11 10:01:08 Jakes-iPhone ScreenShare(CoreFoundation)[261] <Debug>: Language lookup at CFBundle 0x100d0e560 </var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework> (not loaded)
Jan 11 10:01:08 Jakes-iPhone ScreenShare(CoreFoundation)[261] <Debug>: Resource lookup at CFBundle 0x100d0e560 </var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework> (not loaded)
    Result        : file:///var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework/Localizable.strings
Jan 11 10:01:08 Jakes-iPhone ScreenShare(CoreFoundation)[261] <Debug>: Resource lookup at CFBundle 0x100d0e560 </var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework> (not loaded)
Jan 11 10:01:08 Jakes-iPhone ScreenShare(CoreFoundation)[261] <Debug>: Bundle: CFBundle 0x100d0e560 </var/containers/Bundle/Application/B8F713B7-A311-4FAC-8BFD-990F26543808/ScreenShare.app/Frameworks/AMAScreenSharing.framework> (not loaded), key: defaultServiceName, value: , table: Localizable, localizationName: (null), result: Share My Screen
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  13: DNSServiceQueryRecord(100, 0, Share\134032My\134032Screen._airplay._tcp.local., TXT) START PID[261](ScreenShare)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 0 NumAllInterfaceQuestions 2 Share\134032My\134032Screen._airplay._tcp.local. (TXT)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  16: DNSServiceRegister(0, 0, "Share My Screen", "_airplay._tcp", "local", "", 7000) START PID[261](ScreenShare)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   26 Share\134032My\134032Screen._airplay._tcp.local. SRV 0 0 7000 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 1 NumAllInterfaceQuestions 2   26 Share\134032My\134032Screen._airplay._tcp.local. SRV 0 0 7000 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: AutoTargetServices 1 Record   26 Share\134032My\134032Screen._airplay._tcp.local. SRV 0 0 7000 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list    1 Share\134032My\134032Screen._airplay._tcp.local. TXT
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 28 NumAllInterfaceQuestions 2    1 Share\134032My\134032Screen._airplay._tcp.local. TXT
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   21 _services._dns-sd._udp.local. PTR _airplay._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 29 NumAllInterfaceQuestions 2   21 _services._dns-sd._udp.local. PTR _airplay._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   37 _airplay._tcp.local. PTR Share\134032My\134032Screen._airplay._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 30 NumAllInterfaceQuestions 2   37 _airplay._tcp.local. PTR Share\134032My\134032Screen._airplay._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  16: DNSServiceRegister(Share\134032My\134032Screen._airplay._tcp.local., 7000) ADDED
Jan 11 10:01:09 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "Share My Screen" will publish.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  16: DNSServiceUpdateRecord(Share\134032My\134032Screen._airplay._tcp.local., TXT)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  17: DNSServiceQueryRecord(100, 0, C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT) START PID[261](ScreenShare)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 30 NumAllInterfaceQuestions 3 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (TXT)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  18: DNSServiceRegister(0, 0, "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen", "_raop._tcp", "local", "", 49152) START PID[261](ScreenShare)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   26 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. SRV 0 0 49152 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 31 NumAllInterfaceQuestions 3   26 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. SRV 0 0 49152 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: AutoTargetServices 2 Record   26 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. SRV 0 0 49152 Jakes-iPhone.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list    1 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. TXT
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 32 NumAllInterfaceQuestions 3    1 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. TXT
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   18 _services._dns-sd._udp.local. PTR _raop._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 33 NumAllInterfaceQuestions 3   18 _services._dns-sd._udp.local. PTR _raop._tcp.local.
Jan 11 10:01:09 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen" will publish.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_Register_internal: Adding to active record list   71 _raop._tcp.local. PTR C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: IncrementAutoTargetServices: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 3   71 _raop._tcp.local. PTR C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  18: DNSServiceRegister(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., 49152) ADDED
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  18: DNSServiceUpdateRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT)
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: ServiceCallback: All records Registered for _airplay._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  16: DNSServiceRegister(Share\134032My\134032Screen._airplay._tcp.local., 7000) REGISTERED
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>: ServiceCallback: All records Registered for _raop._tcp.local.
Jan 11 10:01:09 Jakes-iPhone mDNSResponder[104] <Info>:  18: DNSServiceRegister(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., 49152) REGISTERED
Jan 11 10:01:09 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "Share My Screen" published.
Jan 11 10:01:09 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen" published.
Jan 11 10:01:10 Jakes-iPhone mDNSResponder[104] <Info>:  13: DNSServiceQueryRecord(Share\134032My\134032Screen._airplay._tcp.local., TXT) ADD  227 Share\134032My\134032Screen._airplay._tcp.local. TXT features=0x5A7FFFF7,0x1E\M-B\M-&srcvers=220.68\M-B\M-&vv=2\M-B\M-&deviceId=C922CD95-A752-480B-A663-8A97D967E15C\M-B\M-&model=AppleTV3,2\M-B\M-&pk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d\M-B\M-&pi=df2d3315-f53f-44de-8acf-fd405e3ad6a6\M-B\M-&flags=0x44
Jan 11 10:01:10 Jakes-iPhone mDNSResponder[104] <Info>:  17: DNSServiceQueryRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT) ADD  177 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. TXT et=0,3,5\M-B\M-&am=AppleTV3,2\M-B\M-&ft=0x5A7FFFF7,0x1E\M-B\M-&sf=0x44\M-B\M-&vn=65537\M-B\M-&vs=220.68\M-B\M-&vv=2\M-B\M-&tp=UDP\M-B\M-&pk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d\M-B\M-&md=0,1,2\M-B\M-&da=true\M-B\M-&cn=0,1,2,3
Jan 11 10:01:10 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "Share My Screen" did update txt record: Optional(\^Xfeatures=0x5A7FFFF7,0x1E\^Nsrcvers=220.68\^Dvv=2-deviceId=C922CD95-A752-480B-A663-8A97D967E15C\^Pmodel=AppleTV3,2Cpk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d'pi=df2d3315-f53f-44de-8acf-fd405e3ad6a6
Jan 11 10:01:10 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen" did update txt record: Optional(et=0,3,5
am=AppleTV3,2\^Rft=0x5A7FFFF7,0x1Esf=0x44vn=65537   vs=220.68\^Dvv=2\^Ftp=UDPCpk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45dmd=0,1,2da=true
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(2004000, 0, "_raop._tcp.", "local.") START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 4 _raop._tcp.local. (PTR)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(_raop._tcp.local.) START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(2004000, 0, "_airplay._tcp.", "local.") START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 5 _airplay._tcp.local. (PTR)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(_airplay._tcp.local.) START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(_raop._tcp.local., PTR) RESULT Add 8:   71 _raop._tcp.local. PTR C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local.
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(_airplay._tcp.local., PTR) RESULT Add 8:   37 _airplay._tcp.local. PTR Share\134032My\134032Screen._airplay._tcp.local.
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceQueryRecord(404000, 8, C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT) START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: InitCommonState: setting RequestUnicast = 2 for C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (TXT)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 6 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (TXT)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceQueryRecord(404000, 8, Share\134032My\134032Screen._airplay._tcp.local., TXT) START PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: InitCommonState: setting RequestUnicast = 2 for Share\134032My\134032Screen._airplay._tcp.local. (TXT)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 7 Share\134032My\134032Screen._airplay._tcp.local. (TXT)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceQueryRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT) ADD  177 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. TXT et=0,3,5\M-B\M-&am=AppleTV3,2\M-B\M-&ft=0x5A7FFFF7,0x1E\M-B\M-&sf=0x44\M-B\M-&vn=65537\M-B\M-&vs=220.68\M-B\M-&vv=2\M-B\M-&tp=UDP\M-B\M-&pk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d\M-B\M-&md=0,1,2\M-B\M-&da=true\M-B\M-&cn=0,1,2,3
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceQueryRecord(Share\134032My\134032Screen._airplay._tcp.local., TXT) ADD  227 Share\134032My\134032Screen._airplay._tcp.local. TXT features=0x5A7FFFF7,0x1E\M-B\M-&srcvers=220.68\M-B\M-&vv=2\M-B\M-&deviceId=C922CD95-A752-480B-A663-8A97D967E15C\M-B\M-&model=AppleTV3,2\M-B\M-&pk=b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d\M-B\M-&pi=df2d3315-f53f-44de-8acf-fd405e3ad6a6\M-B\M-&flags=0x44
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceQueryRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., TXT) STOP PID[27](mediaserverd)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StopQuery_internal:  NumAllInterfaceRecords 34 NumAllInterfaceQuestions 6 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (TXT)
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: SendQueries: (PTR) _raop._tcp.local. reached threshold of 1 answers
Jan 11 10:01:15 Jakes-iPhone mDNSResponder[104] <Info>: SendQueries: (PTR) _airplay._tcp.local. reached threshold of 1 answers
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(104000, 0, "_raop._tcp.", "local.") START PID[27](mediaserverd)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 7 _raop._tcp.local. (PTR)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(_raop._tcp.local.) START PID[27](mediaserverd)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: internal_start_browsing_for_service: Starting browse for: _raop._tcp.local. PTR
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: D2DBrowseListRetain: _raop._tcp.local. PTR refcount now 1
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(104000, 0, "_airplay._tcp.", "local.") START PID[27](mediaserverd)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 34 NumAllInterfaceQuestions 8 _airplay._tcp.local. (PTR)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(_airplay._tcp.local.) START PID[27](mediaserverd)
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: internal_start_browsing_for_service: Starting browse for: _airplay._tcp.local. PTR
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>: D2DBrowseListRetain: _airplay._tcp.local. PTR refcount now 1
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  20: DNSServiceBrowse(_raop._tcp.local., PTR) RESULT Add 8:   71 _raop._tcp.local. PTR C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local.
Jan 11 10:01:16 Jakes-iPhone mDNSResponder[104] <Info>:  19: DNSServiceBrowse(_airplay._tcp.local., PTR) RESULT Add 8:   37 _airplay._tcp.local. PTR Share\134032My\134032Screen._airplay._tcp.local.
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>:  22: DNSServiceQueryRecord(400000, 8, C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., SRV) START PID[27](mediaserverd)
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>: InitCommonState: setting RequestUnicast = 2 for C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (SRV)
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StartQuery_internal: NumAllInterfaceRecords 38 NumAllInterfaceQuestions 9 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (SRV)
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>:  22: DNSServiceQueryRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., SRV) ADD   26 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. SRV 0 0 49152 Jakes-iPhone.local.
Jan 11 10:01:17 Jakes-iPhone mediaserverd(CoreUtils)[27] <Notice>: 2017-01-11 10:01:17.707953 AM APTransportTrafficRegistrar: Register AirPlay traffic for AWDL at MAC 00:00:00:00:00:00 with target infra critical PeerIndication=2 err=0
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>:  22: DNSServiceQueryRecord(C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local., SRV) STOP PID[27](mediaserverd)
Jan 11 10:01:17 Jakes-iPhone mDNSResponder[104] <Info>: mDNS_StopQuery_internal:  NumAllInterfaceRecords 38 NumAllInterfaceQuestions 8 C922CD95-A752-480B-A663-8A97D967E15C@Share\134032My\134032Screen._raop._tcp.local. (SRV)
Jan 11 10:01:17 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen" did accept connection
Jan 11 10:01:17 Jakes-iPhone ScreenShare(libswiftFoundation.dylib)[261] <Notice>: AMA (INFO): Bonjour service "C922CD95-A752-480B-A663-8A97D967E15C@Share My Screen" did accept connection
Jan 11 10:02:18 Jakes-iPhone mediaserverd(CoreUtils)[27] <Notice>: 2017-01-11 10:02:18.217822 AM APTransportTrafficRegistrar: Deregister AirPlay traffic for AWDL at MAC 00:00:00:00:00:00 with target infra non critical PeerIndication=0 err=0
Jan 11 10:02:18 Jakes-iPhone mediaremoted[33] <Notice>: AirPlay Error: Unknown VADPortStatus: -16612
Jan 11 10:02:18 Jakes-iPhone mediaremoted[33] <Notice>: AirPlay Error 5: <private>: <private>.

raop 服务能够连接,并且我的应用似乎正在接收来自 iOS 的流。

以下是配置服务的代码:

airplayService = NetService(domain: "local", type: "_airplay._tcp", name: serviceName, port: 7000)
airplayService?.delegate = self
airplayService?.startMonitoring()
airplayService?.publish(options: NetService.Options.listenForConnections)
airplayService?.setTXTRecord(NetService.data(fromTXTRecord: [
    "model": "AppleTV3,2".data(using: .utf8)!,
    "features": "0x5A7FFFF7,0x1E".data(using: .utf8)!,
    "deviceId": "\(deviceId)".data(using: .utf8)!,
    "flags": "0x44".data(using: .utf8)!,
    "srcvers": "220.68".data(using: .utf8)!,
    "vv": "2".data(using: .utf8)!,
    "pk": "b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d".data(using: .utf8)!,
    "pi": "df2d3315-f53f-44de-8acf-fd405e3ad6a6".data(using: .utf8)!
        ]))

raopService = NetService(domain: "local", type: "_raop._tcp", name: "\(deviceId.replacingOccurrences(of: ":", with: ""))@\(serviceName)", port: 49152)
raopService?.delegate = self
raopService?.startMonitoring()
raopService?.publish(options: NetService.Options.listenForConnections)
raopService?.setTXTRecord(NetService.data(fromTXTRecord: [
    "cn": "0,1,2,3".data(using: .utf8)!,
    "et": "0,3,5".data(using: .utf8)!,
    "tp": "UDP".data(using: .utf8)!,
    "vn": "65537".data(using: .utf8)!,
    "md": "0,1,2".data(using: .utf8)!,
    "pk": "b51418f6854133f71572fe4202a93189981b209cc9ffb9b55f9076b16455d45d".data(using: .utf8)!,
    "am": "AppleTV3,2".data(using: .utf8)!,
    "vs": "220.68".data(using: .utf8)!,
    "da": "true".data(using: .utf8)!,
    "ft": "0x5A7FFFF7,0x1E".data(using: .utf8)!,
    "sf": "0x44".data(using: .utf8)!,
    "vv": "2".data(using: .utf8)!
    ]))

我在这个错误上找不到任何东西。这是什么意思?我的 txt 记录中是否有需要更改的特定内容?

4

0 回答 0