XPC is a low level library that simplifies inter process communication (IPC) on iOS and OS X.
Questions tagged [xpc]
178 questions
10
votes
1 answer
NSXPCConnection pass an object by proxy
The Daemons and Services Programming Guides tells that it is possible to return a proxy object through an open XPC connection, even as a reply block parameter.
Passing an Object By Proxy
Most of the time, it makes sense to copy objects and send…

Andrea Cremaschi
- 533
- 3
- 19
9
votes
1 answer
core audio user-space plug-in driver - sandbox preventing data interaction from another process
I'm working on a coreaudio user-space hal plugin based on the example
developer.apple.com/library/mac/samplecode/AudioDriverExamples/Introduction/Intro.html
In the plug-in implementation, I plan to obtain audio data from another process i.e.…

Allen
- 133
- 1
- 6
8
votes
1 answer
Send file URL and args to (running) macOS app via command line
I've been trying to create a way to tell my (running) macOS app to open some files and supply some additional arguments to the command.
For cold-start apps, using the
$ open MyApp.app fileA.txt --args --foo-arg
would launch the app and I would be…

Andyy
- 485
- 8
- 27
8
votes
1 answer
How to debug communication between XPC service and client app in OSX
I'm trying to write a simple pair of "client app" & "XPC service". I was able to launch xpc service from client (i.e I can see service running in the Activity monitor processes list), but when I try to send any request, that has a response block, I…

Olter
- 1,129
- 1
- 21
- 40
8
votes
2 answers
Crash in iOS: XPC API Misuse
We have a crash in our iOS app reported by crashlytics:
Crashed: XPC API Misuse: Attempt to send a message expecting a reply to (com.apple.networking.connection.0x46bf35a0)
The stack trace is:
Thread : Crashed: XPC API Misuse: Attempt to send a…

Chris
- 489
- 5
- 15
8
votes
1 answer
How does OSX Activity Monitor match XPC tasks to their initiator process?
When an application process launches an XPC helper process, it doesn't actually do the fork()/exec() itself in the classic UNIX style. Instead, it sends a message to launchd, which does the dirty work for it. Thus, if you query the parent process on…

pmdj
- 22,018
- 3
- 52
- 103
8
votes
2 answers
Using a LaunchAgent inside the Mac app sandbox
How would you use a LaunchAgent inside the sandbox? I want to distribute a UI-less LaunchAgent app bundle inside my main application that I can launch on demand. The reason I want this instead of an XPC service is for the KeepAlive option, which…

indragie
- 18,002
- 16
- 95
- 164
8
votes
1 answer
Is an XPC interruption handler called when launchd kills the process?
The documentation for the interruptionHandler block of NSXPCConnection states:
An interruption handler that is called if the remote process exits or crashes.
However, the Daemons and Services Programming Guide states:
XPC services are managed by…

indragie
- 18,002
- 16
- 95
- 164
7
votes
2 answers
Swift: XPC connection interrupted and app freezes?
Ok, have no idea what is going on here but from what I understand from other questions
(XPC connection interrupted in Xcode 7 for iOS 9) , XPC connection interrupted means theres a storyboard problem. Per a similar answer I opened the storyboard as…

blue
- 7,175
- 16
- 81
- 179
7
votes
0 answers
How to efficiently move image data from an XPC service to the main app
TL/DR: What is the most efficient way to decode images in an XPC service, move the data to the main application and then display it?
In several of the WWDC videos that deal with XPC services on macOS, an example that is presented as a good…

kennyc
- 5,490
- 5
- 34
- 57
7
votes
1 answer
Setting a BBSectionInfo using BBSettingsGateway fails for unclear reason
I’m attempting to create a solution for an end-to-end testing suite to set user permissions (contacts, photos, notifications, etc.) on the simulator. The reason for doing this is because permission alerts are displayed by SpringBoard, and they…

Léo Natan
- 56,823
- 9
- 150
- 195
7
votes
2 answers
How should Finder Sync Extension and Main App communicate?
My use case: I have a 'MainApp' which does the syncing of files.
I would like that 'MainApp' handles all server calls regarding syncing and other REST API calls such as document-sharing, etc.
On the other hand, I would have a Finder Sync Extension…

mixtly87
- 1,675
- 15
- 32
7
votes
1 answer
Crashed: XPC API Misuse: Over-resume of a connection
We have a crash in our iOS app reported by Crashlytics:
Device: iPhone 6+
iOS: 10.0.1
The stack trace is:
Crashed: XPC API Misuse: Over-resume of a connection.
0 libxpc.dylib 0x18eb526b0 _xpc_api_misuse + 48
1 libxpc.dylib …

Gabriel.Massana
- 8,165
- 6
- 62
- 81
7
votes
0 answers
Getting the responsible PID for an XPC process
I'm trying to get the PID of the responsible process for an XPC process.
For example, Safari has a PID of 500, and is communicating with 3 instances of com.apple.WebKit.WebContent.xpc, with PIDs of 510, 520, and 530.
Activity Monitor.app seems to…

Edward
- 518
- 3
- 13
6
votes
1 answer
How do you synchronize an MTLTexture and IOSurface across processes?
What APIs do I need to use, and what precautions do I need to take, when writing to an IOSurface in an XPC process that is also being used as the backing store for an MTLTexture in the main application?
In my XPC service I have the…

kennyc
- 5,490
- 5
- 34
- 57