XPC is a low level library that simplifies inter process communication (IPC) on iOS and OS X.
Questions tagged [xpc]
178 questions
1
vote
0 answers
My server application is not responding to any requests
I wrote a simple server which responds to http requests.
The server is based on CFSocket.
Everything works ok when the application runs standalone.
But now I rewrote it to a LaunchAgent app.
I use XPC to communicate with another process.
This…

user2251650
- 159
- 1
- 6
1
vote
1 answer
Multi User Core Data w/ XPC
Howdie,
This is my first post, so if this has been answered somewhere please forgive me (I did search).
Problem:
I have a Cocoa app that needs to share a single Core Data database among multiple user accounts on the system.
Idea:
I would create a…
user2420924
1
vote
1 answer
Talking to launch services on OSX through XPC or MACH
I was wondering if there was a way for third party developers to interact with launch agents and daemons over XPC or Mach. My understanding is that the third party would have to know the dictionary format for XPC or have access to the .defs file…

user194534
- 35
- 5
1
vote
1 answer
XPC causes crash dialog to appear
I implemented XPC as Apple reccomends it for high risk operations. The problem is that when XPC crashes it displays crash dialog to the user. I know that this code can sometimes crach, that is why I mplemented XPC in the first place. So is there any…

Michał Kreft
- 548
- 3
- 16
0
votes
0 answers
Is it possible to create an NSXPCInterface using a generic parameter?
I'm attempting to make a generic wrapper around an NSXPCConnection, and I'm really struggling. I believe the issue is the use of an ObjC Protocol type by NSXPCInterface. I cannot find a way to work with it using generics, but seems like it could be…

Mattie
- 2,868
- 2
- 25
- 40
0
votes
1 answer
AppleScript execution sometimes crashes. Can I separate it from the main app?
I'm building an application for macOS and for some of it's functionality I rely on calling AppleScript:
let appleScript = NSAppleScript(source: theScriptIWantToExecute)
var errorDict: NSDictionary? = nil
let possibleResult =…

Lucas van Dongen
- 9,328
- 7
- 39
- 60
0
votes
1 answer
Do XPC errors imply failure to communicate with a macosx daemon?
I am having a problem where a mac binary that interacts with CoreBluetooth fails as CBCentralManager reports "unsupported". I have already ensured entitlements, codesigning, and Security & Privacy are set properly. When I do verbose bluetooth…

James
- 123
- 1
- 5
0
votes
1 answer
Fast shared memory on macOS using XPC
I have two GUI applications which use shared memory (8 memory instances, each ~100MB) with frequent read/write operations where one application ("server") writes to the memory, and the other reads from it.
On Windows the "server" application creates…

Hyndrix
- 4,282
- 7
- 41
- 82
0
votes
0 answers
Running xpc connection outside the main method
I was wondering if there's any limitation for the context where I initialize my xpc service.
Here's how I currently initialize my xpc service from main() which works just fine.
listener_ = [[NSXPCListener alloc]
…

Zohar81
- 4,554
- 5
- 29
- 82
0
votes
1 answer
How to resolve errors when installing XPC connection on mac so I can hack my furby?
Having an error while installing XPC connection on MacOS. Currently running Mojave (10.14.6). For context, I'm hacking a furby using this repo. It's having me run npm install and then npm install xpc-connection for setup. When I run npm install…
0
votes
1 answer
How to retrieve the XPC service of a file provider extension on macOS?
I have extended my example project from my previous question with an attempt to establish an XPC connection.
In a different project we have successfully implemented the file provider for iOS. The exposed service must be resolved by URLs it is…

p13n
- 859
- 8
- 31
0
votes
1 answer
Add commandline target in Xcode the ability to function as XPC server
I currently have target from type commandlined tool that run as daemon using a plist file under /Library/LaunchDaemons.
Now I need add it the functionality to receive XPC messages from another process that I have. This Macho file is standalone and…

Irad K
- 867
- 6
- 20
0
votes
1 answer
which handler process the reply from server in macos xpc
I have below demo code for XPC client:
xpc_connection_t _connection = xpc_connection_create_mach_service("mac.xpc.service.name",
NULL,
…

Martin Zhang
- 1
- 1
0
votes
1 answer
Get the user's home directory from XPC
My (non-sandboxed) app has an embedded XPC helper which runs as root.
I would like to reference the (real) user's home directory from inside my helper, but these usual suspects simply return…

jeff-h
- 2,184
- 1
- 22
- 33
0
votes
1 answer
How to fix AppStore rejection "Your app requests admin access in order to function" for macOS
I'm currently developing an App that contains a XPC Service embedded.
The App starts in background and communicates with the XPC Service in order to make the service move the mouse from time to time.
My app review by Apple returned this:
Guideline…

Henrique Gouveia
- 131
- 1
- 10