© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
V. VashurkinmacOS Daemonologyhttps://doi.org/10.1007/978-1-4842-7277-0_12

12. Pass Objects by Copy Over XPC Using NSSecureCoding

Volodymyr Vashurkin1  
(1)
Dnipro, Ukraine
 

In real-world scenarios, developers deal not with primitive types but with custom types that aggregate primitives. This chapter covers the topic of passing custom (aggregate) objects over XPC.

All objects passed over an NSXPC connection must conform to NSSecureCoding.

Apple provides such conforming for lots of classes such as NSString, NSURL, NSArray, NSImage, and so on.

But if you want to pass your own class over an XPC connection, you should conform to NSSecureCoding manually. Conforming ...

Get macOS Daemonology: Communicate with Daemons, Agents, and Helpers Through XPC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.