Questions tagged [xpc]

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

178 questions
65
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…
romero-ios
  • 1,075
  • 1
  • 11
  • 20
38
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
  • 381
  • 1
  • 3
  • 4
28
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,618
  • 3
  • 19
  • 29
24
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
  • 495
  • 2
  • 6
  • 11
19
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,476
  • 1
  • 17
  • 28
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
  • 219
  • 2
  • 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
  • 18,002
  • 16
  • 95
  • 164
14
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
  • 141
  • 1
  • 5
12
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
  • 29,408
  • 19
  • 102
  • 161
12
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
  • 6,647
  • 1
  • 45
  • 88
11
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
  • 129
  • 1
  • 4
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
  • 813
  • 6
  • 18
11
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,235
  • 2
  • 40
  • 62
11
votes
1 answer

What is the correct way to self-terminate a MacOS XPC service?

I've successfully followed the Daemons and Service Guide - Creating XPC Services tutorial, along with the SandboxedFetch sample code and have a working Client / Service setup that is using the new NSXPCConnection class. What still isn't entirely…
kennyc
  • 5,490
  • 5
  • 34
  • 57
10
votes
2 answers

SMJobBless failed with CFErrorDomainLaunchd Code 9

Does anybody know what does that error code mean? I get SMJobBless error with this return code value. Failed to bless helper: Error Domain=CFErrorDomainLaunchd Code=9 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 9.)" I googled,…
andrey.s
  • 789
  • 10
  • 28
1
2 3
11 12