Post

Replies

Boosts

Views

Activity

Reply to LaunchAgent in Objective C, Sandboxed App in Swift, how to connect
Thank you! That was the right hint. Unfortunately, this is only solving half of my problem.I'm writing a sandboxed app, which should show notifications when a LaunchAgent does actions. Therefore, the app registers with the LaunchAgent for being notified.To implement this I'm using XPC. The first step is done and works: the app can now register with the LaunchAgent.With the second step I'm running into troubles again. I'm implementing a publish-subscribe pattern. So there is an interface the LaunchAgent is providing. There the app calls subscribe. For the other direction of the message flow the app offers an interface itself, which is offered via anonymous listener endpoint. The endpoint is the parameter for the subscribe message.Now the app has its own listener offering an object with an interface. The LaunchAgent sends the notification message. There is no error. But the message never arrives at the app. And therefore, shouldAcceptNewConnection is never called within the app.Is there another hint you can give me? I'm unsure if this is related to sandboxing, too, or if I'm doing things wrong.
Jun ’20
Reply to Xcode produces XPC service which crashes on startup
That may be. But this can never work with illegal op-codes. That's why I'm reporting. The implementation problem may be related to this:https://stackoverflow.com/questions/59080105/illegal-hardware-instruction-from-very-simple-codeIt tested this code on the Macintosh using clang from mentioned Xcode version. Can confirm:int proveit() { unsigned int n = 0; while (1) n++; return 0; } int main() { proveit(); return 0; }This is delivering:$ clang -O -o noway noway.c $ ./noway [1] 23086 illegal hardware instruction ./noway
Jun ’20