rsms / peertalk

iOS and Mac Cocoa library for communicating over USB
https://rsms.me/peertalk/
MIT License
3.43k stars 502 forks source link

PTUSBHub failed to initialize: Error #52

Closed godwinjoseph-wisilica closed 3 years ago

godwinjoseph-wisilica commented 5 years ago

I can't initialize PTUsbHub

PTUSBHub failed to initialize: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"

GintokiS commented 5 years ago

Yes, I got this problem too. My stuff is MacOS 10.14.4, Xcode 11.1. Deployment target is 10.14. After set breakpoint, I found the init fail at PTUSBHub.m L:354 if (connect(fd, (struct sockaddr*)&addr, socklen) == -1)

But, if I copy -openOnQueue:error:onEnd to a new command line tool project, socket will open success.

So, someone can help me?

godwinjk commented 5 years ago

I have solved it by setting Mac Os sand box settings

GintokiS commented 5 years ago

When I close Sandbox my app run well.

@godwinjk Thanks!

jonathandann commented 3 years ago

The README now contains information about running under the macOS Sandbox