我遇到了一个应用程序(rss阅读器),其中cocoapods在模拟器中运行得非常好,但在目标设备上失败(基于watchOS 4.2)。
RSS Feed源有效。 - 证明:他们在模拟器上运行正常。
以下是在目标设备上运行时的控制台输出:
Session activated: 2 2018-03-01 22:15:20.498785+0100 THMReader WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1 2018-03-01 22:15:21.503717+0100 THMReader WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2 2018-03-01 22:15:22.509594+0100 THMReader WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3 2018-03-01 22:15:23.516451+0100 THMReader WatchKit Extension[326:81502] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted 2018-03-01 22:15:23.516874+0100 THMReader WatchKit Extension[326:81502] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563) 2018-03-01 22:15:23.529698+0100 THMReader WatchKit Extension[326:81502] TIC TCP Conn Failed [1:0x1669aaa0]: 10:-72000 Err(-65563) 2018-03-01 22:15:23.570373+0100 THMReader WatchKit Extension[326:81492] Task . HTTP load failed (error code: -1009 [10:-72000]) 2018-03-01 22:15:23.571235+0100 THMReader WatchKit Extension[326:81492] NSURLConnection finished with error - code -1009
似乎dns服务被锁定了?
nw_resolver_create_dns_service_locked
如何修复此问题以在目标设备上运行代码?