XPC is a low level library that simplifies inter process communication (IPC) on iOS and OS X.
Questions tagged [xpc]
178 questions
4
votes
0 answers
Finder Sync plugin and NSXPCConnection
I have the following situation:
there is a main, non-sandboxed application;
there is a Finder Sync plugin, bundled into this application. Sandboxed;
there is a XPC helper bundled into this application. Sandboxed.
Problem: opening NSXPCConnection…

Nickolay Olshevsky
- 13,706
- 1
- 34
- 48
4
votes
0 answers
Using Instruments to memory profile an XPC service
I'm curious if this is even possible. I'm suffering from a major memory leak or abandoned memory in an XPC service I've written, but I can't seem to track it down. I cannot figure out how to attach instruments to an XPC service.

Artelis
- 159
- 1
- 11
4
votes
1 answer
How can I prevent subprocesses from bouncing in the dock?
I have an application that spawns subprocesses. These subprocesses require XPCServices, that are in the same application bundle.
My main application has its executable in
my.app/Contents/MacOS/my
My XPC service sits in…

Boris Prohaska
- 912
- 6
- 16
4
votes
1 answer
App Sandboxing, XPC Services and different entitlements
My cocoa app design is a single .app (the UI) and three XPC services.
The main app needs file read-only to show the powerbox and display the selected path in the…

Andrew
- 7,630
- 3
- 42
- 51
4
votes
2 answers
Authorizing XPC connections
My application includes as a key component a kernel extension. That kernel extension is controlled by a system control socket. For security reasons, that system control socket only accepts connections from the superuser.
To communicate from my…

John Colanduoni
- 305
- 2
- 8
3
votes
1 answer
How to whitelist XPC custom classes in Swift?
I have a pair of Swift Xcode targets that implement the XPC main app + service app pattern. I figured out how to pass custom classes back and forth, either as arguments to the remote object's methods or "return values" (i.e., arguments the…

fsctl
- 161
- 8
3
votes
0 answers
Exposing a UDP server inside of CoreMediaIO DAL virtual camera plugin
I’m trying to write a CoreMediaIO DAL plugin that will expose a virtual camera. Now, I’d like to be able to send data (frames) to this via another application. To accomplish this, I want to expose a simple UDP server. I looked at XPC services and…

ThePedestrian
- 819
- 2
- 11
- 22
3
votes
2 answers
Not able to connect to XPCService in a Launch agent
I have created an XPC Service .
the server side code briefly is
NSXPCListener *listener = [[NSXPCListener alloc] initWithMachServiceName:@"test.xpcserver"];
listener.delegate = delegate;
[listener resume];
this is installed as a Launch Agent using…

Baab
- 179
- 6
3
votes
1 answer
XPC service to support multiple protocols
I've got a target in my Xcode project that generate XPCService. Now I wish to implement more functions of different context, so I'd like to add them into different protocol.
I wish that the current xpc service support connections from both…

Zohar81
- 4,554
- 5
- 29
- 82
3
votes
1 answer
How to develop iOS simulator plugins
With the rise of different apps, which hijack the iOS simulator (such as flawless or now sherlock) I'm curious how this is done.
As far as I've found there were options based on SIMBL but I don't think the above use it. Further more there is…

Jan
- 1,827
- 2
- 16
- 29
3
votes
1 answer
Must NSSecureCoding-implementing classes be in shared framework to work with XPC?
While following Creating XPC Services guide in Swift and trying to pass custom Foo class I found that in order for this to work it must be in a dynamic library. When it's embedded into both targets the connection to service fails with 4097 code.…

Ian Bytchek
- 8,804
- 6
- 46
- 72
3
votes
1 answer
XPC Between two cocoa applications in workspace, the NSXPCConnection is immediately being invalidated
I have two Cocoa Applications, one is going to be the sender and another the receiver in this XPC relationship.
In the applicationDidFinishLaunching in the sender, I first open the second receiver application
NSError* error = nil;
NSURL* url =…

A O
- 5,516
- 3
- 33
- 68
3
votes
0 answers
iOS 10 App XPC connection interrupted (Works fine in simulator)
We just updated to swift 3 and are trying run code for ios 10. Everything was working fine, but now we have encountered an interesting error. The code works find on the simulator, but when we try to build to the device, when switching between views…

Vishnu Murale
- 173
- 14
3
votes
0 answers
XPC for Long Running Service
I'm writing a client-server application for OS X. The service needs to run forever, or at least as close as possible. :-)
In the past I have used "classic" Distributed Objects quite successfully with an Objective-C application, but this time I…

Paul
- 2,698
- 22
- 27
3
votes
4 answers
How to synchronously wait for reply block when using NSXPCConnection
I'm using NSXPCConnection and one of my interface call has a reply block, like this:
- (void)addItem:(NSData *) withLabel:(NSString *) reply:(void (^)(NSInteger rc))reply;
Which I call like this:
__block NSInteger status;
[proxy addItem:data…

Droopycom
- 1,831
- 1
- 17
- 20