Thanks for this excellent session about Mailkit at WWDC. Using the sample code from the session, I added a new XPC Service Target and am trying to call remote objects via the NSXPCInterface from within mailComposeSessionDidBegin. No success. I can verify that the XPC Service is working fine when I make the same calls to the service from the AppDelegate class' applicationDidFinishLaunching function. So, my question is if mailKit extensions are blocking XPC service invocations?
Use of XPC Services from mailKit
I believe you have the same problem as this: https://developer.apple.com/forums/thread/112628