Questions tagged [xpc]

XPC is a low level library that simplifies inter process communication (IPC) on iOS and OS X.

165 questions
63
votes
11 answers

XPC connection interrupted in Xcode 7 for iOS 9

I recently updated to Xcode 7 and upgraded my iPhone to iOS 9. I have developed and released an iOS app that had worked perfectly fine on the latest version of iOS 8 and Xcode 6. Upon trying to go through the process of updated the app for iOS 9…
iOShepherd
  • 1,025
  • 1
  • 11
  • 19
23
votes
3 answers

Is possible to use Mac OS X XPC like IPC to exchange messages between processes? How?

According to Apple, the new XPC Services API, introduced in Lion, provides a lightweight mechanism for basic interprocess communication integrated with Grand Central Dispatch (GCD) and launchd. It seems possible to use this API as a kind of IPC,…
poorDeveloper
  • 475
  • 2
  • 6
  • 11
22
votes
5 answers

CoreBluetooth XPC connection invalid

public class BLE: NSObject, CBCentralManagerDelegate { var centralManager:CBCentralManager! public override init() { super.init() self.centralManager = CBCentralManager.init(delegate: self, queue: nil) } public…
Zeryx
  • 221
  • 1
  • 2
  • 4
22
votes
3 answers

Communicate with another app using XPC

I have a windowed app, and to add some functionality I need another app which launches at login and sync data to server if available. I have tried with NSDistributionNotification but its practically useless in a sandboxed app. I looked up XPC and…
user88975
  • 1,318
  • 3
  • 14
  • 28
17
votes
1 answer

How to send a message from XPC helper app to main application?

I was successful in creating XPC service and communicating with XPC service by sending messages from main application. But what I want to know is, whether its possible to initiate a communication from XPC service to the main application. The Apple…
MjZac
  • 3,060
  • 1
  • 17
  • 24
16
votes
1 answer

AppleEvents: Send port for process has no send right

I'm seeing this in my Mac OS X Yosemite Console: AppleEvents: Send port for process has no send right, port=( port:30743/0x7817 rcv:1,send:0,d:0 limit:5) (findOrCreate()/AEMachUtils.cp #526) com.apple.NSXPCConnection.user.1963 I'm developing…
Arius Kahn
  • 209
  • 1
  • 9
15
votes
5 answers

Running multiple instances of the same XPC service (NSXPCConnection)

Is it possible to run multiple instances of the same XPC service using the XPC APIs found in Foundation.framework (NSXPCConnection, etc.)? The docs don't provide much insight on this matter. EDIT: Did a quick test, and it seems like only one…
indragie
  • 17,634
  • 15
  • 89
  • 161
13
votes
0 answers

Received XPC error: Connection interrupted

I've got the following error in the Xcode console: Received XPC error Connection interrupted for message type 3 kCFNetworkAgentXPCMessageTypePACQuery. By the way, I used Xcode 9.0 and language was Objective-C. And I also want to know the meaning…
wiz
  • 131
  • 1
  • 5
11
votes
3 answers

SMLoginItemSetEnabled sometimes silently fails to launch sandboxed UI helper

I have an app that is sandboxed, and includes a helper that presents some UI (as a full-screen window, but could be a status item or similar too). This works... most of the time. But sometimes it doesn't; it just silently fails to start the…
Dejal
  • 713
  • 5
  • 17
11
votes
1 answer

App sandbox: how to allow XPC service to read file that user opened in parent app?

I have a simple Cocoa image preview app. The user selects a file using an NSOpenPanel and the app generates a preview image using the Quick Look API. I'd like to move the preview generation into a separate XPC service. Without app sandboxing…
Mark
  • 5,965
  • 1
  • 37
  • 77
10
votes
1 answer

Mac OS X XPC as IPC between two applications

I have a windowed application and windowless helper, sitting inside the app bundle, and working as login item. App can start and stop the helper, everything woks there. The problem is that I need to create some bidirectional communication channel…
DeadlineX
  • 109
  • 1
  • 4
10
votes
4 answers

Communicate between finder sync extension and XPC

I am working on a Finder Sync Extension for OS X and want to use a background XPC service. I can start in the main app and have it launch the XPC and run correctly but nothing happens when I attempt to access it from the Finder Sync. both the…
utahwithak
  • 6,025
  • 2
  • 38
  • 56
10
votes
3 answers

XPC not registering classes correctly for collection

I'm using XPC in one of my apps on 10.8. It's got the standard setup with protocols defined for exported interface and the remote interface. The problem I run into is with one of my methods on the exported interface. I have a model class, lets just…
sudo rm -rf
  • 28,958
  • 19
  • 100
  • 160
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
  • 18
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
  • 6
1
2 3
10 11