1

I have a 64 bit cocoa project that needs to use a 32-bit rendering library, which I cannot port to 64-bit.

I decided to separate it to a rendering service, which will be compiled in 32-bit and will provide an interface for the library, and the main project, which will be compiled in 64-bit and will access the rendering service.

I am wondering what is the best way to do the interprocess communication. I am looking for a solution that will provide fast communication and easy api.

It seems that XPC (and specifically, NSXPCConnection) is the recommended solution nowadays. However, I'm not sure - is it implemented for 32-bit applications?

In addition, I need to pass a fairly large quantity of data (max ~5MB), and so I worry about the performance and speed of the XPC. Is shared memory mapping is possible/recommended in this situation? can it work in conjunction with xpc?

Niv
  • 2,294
  • 5
  • 29
  • 41

1 Answers1

0

For 32-to-64-bit APIs, Apple does use XPC services in their own apps, like Pages, to migrate old data to a more recent API.

Although I have yet to get it to work using NSXPCConnection, and Apple's own apps use the functions found in xpc/xpc.h.

MaddTheSane
  • 2,981
  • 24
  • 27
  • I have since successfully used NSXPCConnection for this task. It's pretty straightforward. – Niv Sep 02 '14 at 22:05