NSPrintOperation在沙盒Mac应用程序中将色轮旋转几秒钟

时间:2019-04-24 09:25:15

标签: macos sandbox nsprintoperation

以下对NSPrintOperation的简单调用开始运行非常缓慢且旋转的色轮:

NSPrintInfo* printInfo = [NSPrintInfo sharedPrintInfo];
NSPrintOperation* opeation = [NSPrintOperation printOperationWithView:[self view] printInfo:printInfo];
[opeation runOperation];

使用以下登录控制台:

12:00:37.659430+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
12:00:38.660534+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
12:00:39.662490+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
12:00:40.663736+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
12:00:40.666875+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
12:00:41.667635+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
12:00:42.668884+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
12:00:43.669116+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
12:00:43.694588+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
12:00:44.694744+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
12:00:45.696010+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
12:00:46.697261+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
12:00:46.720609+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
12:00:47.720890+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
12:00:48.721326+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
12:00:49.721529+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted
12:00:49.726589+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
12:00:50.727795+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
12:00:51.728552+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
12:00:52.728778+0300 PrintTest[2196:128061] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:8 Err:-1 Errno:1 Operation not permitted

看起来像是在升级到macOS 10.14之后开始的。仅在启用沙箱时才会发生。检查打印权利。其他沙盒应用程序,例如Preview和TextEdit似乎不受此影响,并迅速开始打印对话框。有什么想法可以解决此问题吗?

0 个答案:

没有答案