Questions tagged [xpc]

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

178 questions
3
votes
1 answer

XPC remoteObjectWithErrorHandler wont throw an error

I'm trying to detect if helper tool is installed trough error handler, but the error block won't get executed neither the success block. When the helper is already installed it works fine. It just doesn't catch errors when there is one. In…
Dellar
  • 41
  • 4
3
votes
1 answer

OS X - Truly 'On Demand' Privileged Helper Tool

My application needs to write files to restricted places on the filesystem. To do so, I use a helper tool that is run as root. Everything is working correctly, following this example, my helper tool is correctly installed and run. I use this…
Vince
  • 525
  • 1
  • 3
  • 19
3
votes
1 answer

com.apple.xpc.launchd.oneshot

In an XCTestCase test, I created a NSTask object and set it to run printenv. Then after the NSTask finished, I ran printenv using fork and execv. The output from both was identical except for one environment variable. NSTask:…
fumoboy007
  • 5,345
  • 4
  • 32
  • 49
3
votes
2 answers

How to resolve xpc.h not found error?

I am working on a iOS application and in this application I have send SMS internally without user involvement. And After googling I found a answer and I am using this code. xpc_connection_t myconnection; dispatch_queue_t queue =…
ajeet sharma
  • 803
  • 10
  • 37
3
votes
1 answer

Communicating over XPC with an app and launch daemon running as root

Is it possible to communicate with a launch daemon running as root and an application over XPC? When my daemon is running as my user I can communicate with it fine, when run as root it stops receiving my messages. Is this intended security inside…
Thunder
  • 611
  • 1
  • 8
  • 25
3
votes
1 answer

XPC communication between service and client app works only when launched from xcode

XPC communication works fine when I launch the targets from my Xcode. But, when I manually launch the service and client apps by double clicking them on the icons, the connection invalidation message shows up.Whay do they work fine inside xcode and…
a k
  • 531
  • 5
  • 15
3
votes
1 answer

Can you run an XPC service inside a plugin? (e.g. a Print Dialog Extension plugin)

I am creating a Print Dialog Extension (PDE) plugin. This plugin is called and displayed when a user Prints from different apps, e.g. TextEdit, Preview, Xcode, etc. Note that the plugin runs on top of the app that called the Print Plugin (for…
MiuMiu
  • 1,905
  • 2
  • 19
  • 28
3
votes
2 answers

Sharing a single copy of a framework with multiple bundles

I have a framework that is being used in my application, plus a few XPC services contained inside the application bundle. How can I link all the bundles to the single copy of the framework contained inside the application's Frameworks folder (vs…
indragie
  • 18,002
  • 16
  • 95
  • 164
3
votes
1 answer

Does XPC require sandboxing for MAS

I have a sandboxed app. This app has an XPC service which is not sandboxed. Does the XPC service need to be sandboxed as well for me to be able to submit to the Mac App Store?
firstresponder
  • 5,000
  • 8
  • 32
  • 38
3
votes
1 answer

Mix NSXPCConnection and xpc C API

I am working with XPC services using NSXPCConnection wrapper, and since the Objective-C wrapper can't handle IOSurfaceRef objects, I would like to make some direct functions calls to the C API defined in xpc.h. But I can't find a way to retrieve the…
Andrea Cremaschi
  • 533
  • 3
  • 19
3
votes
1 answer

Pass xpc_object_t through NSXPCConnection

I am new to XPC service programming, and I am trying to share a IOSurface created in a XPC service to the host application. I can setup a simple host and service using NSXPCConnection API, and now I think I am supposed to use these two methods…
Andrea Cremaschi
  • 533
  • 3
  • 19
3
votes
0 answers

Terminate a Launchd-launched Privileged Helper

My app (Cocoa) includes a privileged helper tool (C) that's installed using SMJobBless, modeled after the SMJobBlessXPC sample code by Nathan de Vries. It successfully launches on a connection attempt to its exported Mach XPC connection. So far so…
Matt Patenaude
  • 4,497
  • 1
  • 22
  • 21
3
votes
1 answer

XPC and cross-architecture OSX applications

for a desktop application I am developing, I have to stick with a 32-bit framework. I am looking for the best path to run the framework in its proper process and develop the rest of the application in a 64-bit process. The application is also meant…
Andrea Cremaschi
  • 533
  • 3
  • 19
2
votes
1 answer

How can I edit entitlements for xcp-services in Xcode 4 for App-Sandboxing

I created an App and started to sandbox it. Now I did privilege separation using xpc-services. I downloaded the "SandboxedFetch" example from Apple, which shows two xpc-services like an application (application-icon). In my App the xpc-services show…
JackPearse
  • 2,922
  • 23
  • 31
2
votes
0 answers

EXC_BAD_INSTRUCTION when sending message to XPC Service

I'm trying to use an XPC Service for inter-process communication. I've added an XPC service target to my project, and then when I try doing a xpc_connection_send_message I get EXC_BAD_INSTRUCTION. As far as I can tell, I am correctly initializing…
Peter Jacobs
  • 1,657
  • 2
  • 13
  • 29